Build Snake with an AI Opponent
Build the classic Snake game with a twist: an AI-controlled snake competes against you for food.
Requirements
Classic snake mechanics: grow when eating food, die on wall/self collisionAI snake that pathfinds to food using A* or BFSBoth snakes compete for the same food itemsScore tracking for both player and AIIncreasing difficulty: snakes speed up as they growGame over screen with replay optionKeyboard controls (WASD or arrow keys)Technical Notes
Use Canvas for rendering. Update game state on a fixed tick interval. AI pathfinding should avoid both snakes' bodies.
Bonus Points
AI difficulty settings (easy: random, hard: A*)Power-ups (speed boost, ghost mode, score multiplier)2-player mode (WASD + arrows)