Isolation is a strategy game where two players aim to isolate the other player's pawn on a grid. In this iOS app, players can play against each other or challenge an AI opponent that uses the minimax algorithm with alpha-beta pruning and iterative deepening. The game offers multiple difficulty levels for the AI.
new.mov
- AI Player: The AI opponent uses advanced algorithms (minimax with alpha-beta pruning and iterative deepening) to make decisions.
- Human vs Human: Play against another player on the same device.
- AI Difficulty Levels: Multiple difficulty settings for the AI player.
- Responsive UI: The game adapts to different screen sizes and resolutions using SwiftUI.
- Game State: The game keeps track of moves, and automatically switches turns between Player 1 and Player 2.
Defines the Player class, which represents a player in the game (either human or AI). The player’s state is tracked, including their last position and the number of moves they’ve made.
Contains the logic for the AI opponent, which uses the minimax algorithm with alpha-beta pruning to decide the best possible move.
Defines the Cell class, representing each square on the game board. It manages the current player occupying the cell and determines how it is displayed.
The Board class contains the entire game state, including player turns, allowed moves, and logic for checking victory conditions. It also contains methods to forecast potential moves and update the board accordingly.
The main UI for the game, built using SwiftUI. It displays the board and allows the user to interact with it. It also provides buttons for resetting the game and checking victory conditions.