A modern, responsive implementation of the classic Othello (Reversi) board game with beautiful animations.
- ๐ฏ Classic Othello Gameplay - Full implementation of traditional Othello rules
- ๐ฑ Responsive Design - Perfect on desktop, tablet, and mobile devices
- ๐ก Move Hints - Toggle-able valid move indicators for beginners
- โก Smooth Animations - Fluid piece placement and flipping animations
- ๐จ Modern UI - Clean, professional interface built with Tailwind CSS
- ๐ New Game - Quick restart functionality
- ๐ Reset Game - Quickly undo all moves back to initial state without animation
- ๐ Live Score Tracking - Real-time score updates for both players
- ๐ช Turn Indicators - Clear visual indication of current player with breathing animations
- โถโท Undo/Redo - Full move history with undo and redo functionality
- ๐พ Local Storage - Automatic game state saving, sound preferences, and settings persistence
- ๐ Sound Effects - Audio feedback for piece placement with toggle control
- ๐ฑ Fullscreen Mode - Mobile fullscreen toggle for immersive gameplay experience
- ๐ง Progressive Web App - Install the game as a native-like app, works offline
Othello (also known as Reversi) is a strategy board game for two players. Here's how to play:
Have the majority of your colored pieces on the board when the game ends.
- Starting Position: The game begins with 4 pieces in the center - two black and two white arranged diagonally
- Taking Turns: Black always goes first, then players alternate turns
- Valid Moves: You must place your piece adjacent to an opponent's piece, with at least one of your pieces on the opposite side (horizontally, vertically, or diagonally)
- Capturing: All opponent pieces between your new piece and existing piece get flipped to your color
- Passing: If you have no valid moves, your turn is skipped
- Game End: When the board is full or no valid moves exist for either player
- Winner: Player with the most pieces on the board wins
- Click any highlighted cell to place your piece
- New Game button to restart
- Reset button to quickly undo all moves back to initial state
- Show valid moves checkbox to toggle move hints
- Undo (โถ) and Redo (โท) buttons to navigate move history
- Sound toggle (๐/๐) button to enable/disable audio effects
- Fullscreen toggle (๐ฑ/๐ณ) button for mobile immersive experience
- Frontend: HTML5, CSS3, JavaScript (ES6+)
- Styling: Tailwind CSS
- Fonts: Inter (Google Fonts)
- PWA: Service Worker, Web App Manifest
- Deployment: GitHub Pages
- CI/CD: GitHub Actions
- A modern web browser
- Basic web server (optional, for local development)
-
Clone the repository
git clone https://github.com/salujayatharth/othello.git cd othello -
Open in browser
# Option 1: Direct file opening open index.html # Option 2: Local server (recommended) python -m http.server 8000 # or npx serve .
-
Access the game
- Direct file:
file:///path/to/othello/index.html - Local server:
http://localhost:8000
- Direct file:
- No build process required - it's a pure client-side application
- All game logic is contained in
index.html - Responsive design works on all screen sizes
This Othello game is a fully-featured Progressive Web App with the following capabilities:
- Install on Mobile: Open in Chrome/Safari and tap "Add to Home Screen"
- Install on Desktop: Look for the install icon in the address bar or use the install prompt
- ๐ด Offline Play: Game works completely offline after first visit
- ๐ App-like Experience: Launches in standalone mode without browser UI
- ๐ Auto-updates: New versions are cached and updated automatically
- ๐พ Persistent Storage: Game state is saved even when offline
- ๐จ Native Theming: Matches your device's theme and provides proper app icons
manifest.json- App configuration and metadatasw.js- Service Worker for offline functionalityicons/- App icons for different devices and sizes
othello/
โโโ index.html # Complete game implementation
โโโ main.js # Main game logic and PWA functionality
โโโ AudioManager.js # Audio management system
โโโ style.css # Custom styles and animations
โโโ manifest.json # PWA manifest configuration
โโโ sw.js # Service Worker for offline functionality
โโโ favicon.ico # App favicon
โโโ drop.mp3 # Sound effect file
โโโ icons/ # PWA app icons (various sizes)
โโโ README.md # This file
โโโ .github/
โโโ workflows/
โโโ static.yml # GitHub Pages deployment
- Color Scheme: Professional green game board with contrasting pieces
- Typography: Inter font family for clean, modern text
- Animations: CSS keyframes for smooth piece placement
- Responsive Grid: CSS Grid for perfect board scaling
- Hover Effects: Interactive feedback for better UX
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- ๐ค AI opponent implementation
- ๐ Game statistics and history
- ๐ต Background music
- ๐ Achievement system
- ๐ Multiplayer support
This project is open source and available under the MIT License.
- Classic Othello game rules and design inspiration
- Tailwind CSS for the excellent utility-first framework
- Google Fonts for the beautiful Inter typeface
- GitHub Pages for free hosting
Enjoy playing Othello! ๐ฎ
โญ Star this repo if you found it helpful!