Skip to main content

Posts

Showing posts from November, 2025

Team21Ai Game 2

import React, { useState, useEffect, useRef, useCallback } from 'react'; import { ObstacleType } from '../types'; import Plane from './Plane'; import Obstacle from './Obstacle'; import { GAME_WIDTH, GAME_HEIGHT, GRAVITY, LIFT, PLANE_WIDTH, PLANE_HEIGHT, OBSTACLE_WIDTH, OBSTACLE_GAP, OBSTACLE_SPEED, OBSTACLE_INTERVAL, HORIZONTAL_SPEED, DIVE_FORCE, MAX_ROTATION, ROTATION_VELOCITY_SCALAR, } from '../constants'; interface GameProps { onGameOver: (score: number) => void; } const Game: React.FC = ({ onGameOver }) => { const [planeY, setPlaneY] = useState(GAME_HEIGHT / 2); const [planeX, setPlaneX] = useState(GAME_WIDTH / 2 - PLANE_WIDTH / 2); const [planeVelocity, setPlaneVelocity] = useState(0); const [planeRotation, setPlaneRotation] = useState(0); const [obstacles, setObstacles] = useState ([]); const [score, setScore] = useState(0); const [keysPressed, setKeysPressed] = useState >(new Set()); ...

Team21 Ai Game

Team21 SkyRunner — Simple HTML5 Flight Game Score: 0 Fuel: 100 % SkyRunner Use ↑ / ↓ or tap the buttons to fly. Avoid obstacles and collect fuel. Start Game How to Play Game Over Your score: 0 Play Again ▲ ▼ Tap on mobile · Keyboard on desktop