This is a project for the course of Artificial Intelligence at Ain Shams University.In this project, we implement the Gobblet game, an abstract strategy game played on a 4x4 grid. The game involves two players, each with twelve pieces that can nest on top of one another to create three stacks of four pieces.
The goal of Gobblet is to place four like-colored pieces in a horizontal, vertical, or diagonal row. Each player's pieces start nested off the board. On a turn, a player can either play one exposed piece from their three off-the-board piles or move one piece on the board to any other spot where it fits. Larger pieces can cover smaller ones, but a piece being played from off the board may not cover an opponent's piece unless it's in a row where the opponent already has three pieces of their color.
Players need to remember which color one of their larger pieces is covering before moving it. If a player has four like-colored pieces in a row, they win the game. However, there is an exception: if a player lifts their piece and reveals an opponent's piece that completes a four-in-a-row, they don't immediately lose. They can't return the piece to its starting location, but if they can place it over one of the opponent's three other pieces in that row, the game continues.
- 16-square playing board
- 12 white Gobblets
- 12 black Gobblets
The RULES OF THE GAME are essential to understanding the gameplay. Make sure to go through them before starting.
Watch the instructional video here.
The game supports 3 different modes of playing:
- Human vs. Human
- Human vs. Computer
- Computer vs. Computer
Adjust the difficulty levels for the AI opponents to suit your gaming preferences:
- Easy
- Hard
The user interface supports multiple features:
- Visualize the current game board and pieces on it.
- Human players can make moves effortlessly by clicking on the board.
- Upon completion of the game, the winner is announced clearly.
The Gobblet Game is designed for ease of use, providing a seamless gaming experience controlled entirely with the mouse. Follow the steps below to navigate through the game:
-
Game Modes Selection:
-
Player vs Player:
- If you select Player vs Player, no additional options are needed. Enjoy the game directly with another player.
-
Player vs PC:
-
PC vs PC:
-
Game Screen:
-
End of Game:
- Upon completion of the game, the final screen will announce the winner of the game.
Note: The game is entirely controlled with mouse interactions, making it accessible and intuitive for players of all levels.
Enjoy playing the Gobblet Game!
- Mostafa Mahmoud Ali Ahmed (ID: 1900034)
- Mohamed Khaled Mohamed Soliman (ID: 1900356)
- Abdelrahman Ali Mohamed Ali (ID: 1900913)
- Mustafa Osama Mohamed Mhamed (ID: 1900565)
- Maram Ahmed Hussein Mostafa (ID: 1900050)
- Mai Esmail Gamal Mohammed (ID: 1900171)
- Esraa Amr Abdelmoneam (ID: 1900061)
- Habiba Ahmed Alaa Eldin Mohamed (ID: 1900839)
- Aliaa Nabil Mahmoud Mohamed (ID: 1900949)