Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
aisbf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexlab
aisbf
Commits
612a8358
Commit
612a8358
authored
Apr 22, 2026
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some minor last minute fixes
parent
b9db3a62
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
15 deletions
+57
-15
__init__.py
aisbf/__init__.py
+1
-1
pyproject.toml
pyproject.toml
+1
-1
setup.py
setup.py
+1
-1
base.html
templates/base.html
+54
-12
No files found.
aisbf/__init__.py
View file @
612a8358
...
...
@@ -54,7 +54,7 @@ from .auth.qwen import QwenOAuth2
from
.handlers
import
RequestHandler
,
RotationHandler
,
AutoselectHandler
from
.utils
import
count_messages_tokens
,
split_messages_into_chunks
,
get_max_request_tokens_for_model
__version__
=
"0.99.5
3
"
__version__
=
"0.99.5
4
"
__all__
=
[
# Config
"config"
,
...
...
pyproject.toml
View file @
612a8358
...
...
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name
=
"aisbf"
version
=
"0.99.5
3
"
version
=
"0.99.5
4
"
description
=
"AISBF - AI Service Broker Framework || AI Should Be Free - A modular proxy server for managing multiple AI provider integrations"
readme
=
"README.md"
license
=
"GPL-3.0-or-later"
...
...
setup.py
View file @
612a8358
...
...
@@ -49,7 +49,7 @@ class InstallCommand(_install):
setup
(
name
=
"aisbf"
,
version
=
"0.99.5
2
"
,
version
=
"0.99.5
4
"
,
author
=
"AISBF Contributors"
,
author_email
=
"stefy@nexlab.net"
,
description
=
"AISBF - AI Service Broker Framework || AI Should Be Free - A modular proxy server for managing multiple AI provider integrations"
,
...
...
templates/base.html
View file @
612a8358
...
...
@@ -271,9 +271,43 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#start-screen .play-btn:hover {
background: #ff5acc;
}
#gameover-screen {
position: absolute;
background: #120d18;
padding: 30px;
border: 5px solid #0d0a12;
box-shadow: 0 50px 50px -30px rgba(0,0,0,0.3);
text-align: center;
z-index: 10;
border-radius: 10px;
}
#gameover-screen h2 {
color: #ff76ff;
font-size: 20px;
margin-bottom: 15px;
text-shadow: 0 0 10px #ff76ff;
}
#gameover-screen p {
color: #e9eaee;
font-size: 12px;
margin-bottom: 20px;
}
#gameover-screen .play-btn {
background: #ff76ff;
border: none;
color: #0d0a12;
padding: 15px 30px;
font-family: 'Press Start 2P', cursive;
font-size: 14px;
cursor: pointer;
margin-top: 10px;
}
#gameover-screen .play-btn:hover {
background: #ff5acc;
}
canvas {
background: #09080a;
border: 2px solid #
0d0a12
;
border: 2px solid #
3e3f43
;
}
#score {
position: fixed;
...
...
@@ -299,11 +333,17 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
<button class="play-btn" onclick="startGame()">Play</button>
</div>
<canvas id="game-canvas"></canvas>
<div id="gameover-screen" class="hidden">
<h2>🐍 Game Over 🐍</h2>
<p id="gameover-score"></p>
<button class="play-btn" onclick="playAgain()">Play Again</button>
</div>
</div>
<script>
const canvas = document.getElementById('game-canvas');
const ctx = canvas.getContext('2d');
const startScreen = document.getElementById('start-screen');
const gameoverScreen = document.getElementById('gameover-screen');
const scoreDisplay = document.getElementById('score');
// Set canvas size
...
...
@@ -342,12 +382,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
function placeFood() {
food = {
x: Math.floor(Math.random() * (canvas.width
- 20)) + 1
0,
y: Math.floor(Math.random() * (canvas.height
- 20)) + 1
0
x: Math.floor(Math.random() * (canvas.width
/ 20)) * 2
0,
y: Math.floor(Math.random() * (canvas.height
/ 20)) * 2
0
};
// Align to grid
food.x = Math.floor(food.x / 20) * 20 + 10;
food.y = Math.floor(food.y / 20) * 20 + 10;
}
function startGame() {
...
...
@@ -407,22 +444,26 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
ctx.fillStyle = '#fac020';
snake.forEach((segment, i) => {
ctx.fillStyle = i === 0 ? '#ffd700' : '#fac020';
ctx.fillRect(segment.x
- 9, segment.y - 9
, 18, 18);
ctx.fillRect(segment.x
+ 1, segment.y + 1
, 18, 18);
});
// Draw food
ctx.fillStyle = '#ee6b71';
ctx.beginPath();
ctx.arc(food.x
, food.y
, 8, 0, Math.PI * 2);
ctx.arc(food.x
+ 10, food.y + 10
, 8, 0, Math.PI * 2);
ctx.fill();
}
function gameOver() {
clearInterval(gameLoop);
showAlert('Game Over! Score: ' + score, 'Game Over 🐍').then(() => {
startScreen.classList.remove('hidden');
scoreDisplay.style.display = 'none';
});
document.getElementById('gameover-score').textContent = 'Score: ' + score;
gameoverScreen.classList.remove('hidden');
scoreDisplay.style.display = 'none';
}
function playAgain() {
gameoverScreen.classList.add('hidden');
startScreen.classList.remove('hidden');
}
// Keyboard controls
...
...
@@ -457,6 +498,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
var
gameWindow
=
window
.
open
(
''
,
'SnakeGame'
,
'width=650,height=500'
);
gameWindow
.
document
.
write
(
gameHtml
);
gameWindow
.
document
.
close
();
gameWindow
.
focus
();
}
})();
</script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment