Change UI

This commit is contained in:
Peter Stockings
2026-01-10 10:56:58 +11:00
parent f607e83b0d
commit c3e942ee60
6 changed files with 533 additions and 30 deletions

View File

@@ -96,12 +96,12 @@ export default function SnakeCanvas({ network, gridSize, showGrid = true, size =
const canvasSize = gridSize * CELL_SIZE + CANVAS_PADDING * 2;
// Clear canvas
ctx.fillStyle = '#1a1a2e';
ctx.fillStyle = '#000000';
ctx.fillRect(0, 0, canvasSize, canvasSize);
// Draw grid
if (showGrid) {
ctx.strokeStyle = '#2a2a3e';
ctx.strokeStyle = '#1a1a1a';
ctx.lineWidth = 1;
for (let i = 0; i <= currentGame.gridSize; i++) {
const pos = i * CELL_SIZE + CANVAS_PADDING;
@@ -155,7 +155,7 @@ export default function SnakeCanvas({ network, gridSize, showGrid = true, size =
ctx.fillRect(0, 0, canvasSize, canvasSize);
ctx.fillStyle = '#e74c3c';
ctx.font = `bold ${size === 'small' ? '16' : '24'}px Inter, sans-serif`;
ctx.font = `bold ${size === 'small' ? '16' : '24'}px 'Courier New', monospace`;
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';
ctx.fillText('DEAD', canvasSize / 2, canvasSize / 2);
@@ -174,9 +174,8 @@ export default function SnakeCanvas({ network, gridSize, showGrid = true, size =
style={{
width: `${canvasSize}px`,
height: `${canvasSize}px`,
border: '2px solid #3a3a4e',
borderRadius: '8px',
backgroundColor: '#1a1a2e',
border: '1px solid #333',
backgroundColor: '#000000',
}}
/>
{currentGame && (size !== 'small' || showStats) && (