Skip to content

Repository files navigation

Snake Game 🐍

A modern implementation of the classic Snake game built with React, TypeScript, and Vite. Experience smooth gameplay with a clean, minimalist interface powered by Tailwind CSS.

Features

  • 🎮 Intuitive controls with keyboard arrows and touch support for mobile devices
  • 🌓 Dark/Light theme with system preference detection
  • ⏸️ Pause and resume gameplay functionality
  • 📊 Real-time score tracking
  • 🎯 Smooth snake movement and collision detection
  • 🎨 Modern, responsive UI with Tailwind CSS
  • 🔲 Toggleable grid display option
  • 💾 Persistent settings (theme and grid preferences)
  • 🔧 Built with React and TypeScript for type safety

Prerequisites

  • Node.js (version 18 or higher)
  • npm or yarn package manager

Installation

  1. Clone the repository:
git clone https://github.com/mrpineapples/snake.git
cd snake
  1. Install dependencies:
npm install

Development

To start the development server:

npm run dev

This will start the development server at http://localhost:5173.

Building for Production

To create a production build:

npm run build

To preview the production build:

npm run preview

Tech Stack

  • React 19
  • TypeScript
  • Vite
  • Tailwind CSS
  • ESLint for code quality

License

This project is open source and available under the MIT license.

Releases

Packages

Used by

Contributors

Languages