Skip to content

Mangala is a Turkish strategy game played by two players. The game board consists of 12 small pits, 6 for each player, and a large storehouse where each player collects their stones. The game is played with a total of 48 stones.

License

Notifications You must be signed in to change notification settings

barannmeisterr/Mangala-Board-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mangala/Mancala Board Game

Mangala is a Turkish strategy game played by two players. The game board consists of 12 small pits, 6 for each player, and a large storehouse where each player collects their stones. The game is played with a total of 48 stones.

Players distribute the 48 stones evenly, with 4 stones in each pit. Each player's side consists of 6 pits, and their opponent's side is directly opposite. Players aim to collect the most stones in their storehouse by the end of the game.

The game starts with player 1. The player 1 starts by selecting any of their pits and taking 4 stones from it. They then distribute these stones one by one in a counter-clockwise direction, placing one stone in each pit until they run out of stones. If a stone lands in their storehouse, the player gets another turn. If a player's pit has only one stone, they can move that stone to the adjacent pit on their side. Then it's the opponent's turn. The fate of the game depends on the last stone remaining in a player's hand.

During their turn, if a player still has stones in their hand after distributing them in their own pits, they continue distributing stones into the opponent's pits. If a stone lands in a pit on the opponent's side and the total number of stones in that pit becomes even (2, 4, 6, 8, etc.), the player collects all the stones in that pit and adds them to their storehouse. Then it's the opponent's turn.

If, while distributing stones, the last stone in a player's hand lands in one of their own empty pits, and the opposite pit on the opponent's side contains stones, the player collects the stones from the opponent's pit and the stone they placed in their empty pit, adding them all to their storehouse. Then it's the opponent's turn.

The game ends when one player's pits are empty. The player whose side is emptied first also collects all the stones from the opponent's side. Thus, the dynamics of the game remain intense until the very end.

Author

  • Arda Baran

Features

  • The game can be played by two player
  • The game take pit number inputs from players.
  • The game starts with player 1. The player 1 starts by selecting any of their pits and taking 4 stones from it. They then distribute these stones one by one in a counter-clockwise direction, placing one stone in each pit until they run out of stones. If a stone lands in their storehouse, the player gets another turn. If a player's pit has only one stone, they can move that stone to the adjacent pit on their side. Then it's the opponent's turn. The fate of the game depends on the last stone remaining in a player's hand.
  • During their turn, if a player still has stones in their hand after distributing them in their own pits, they continue distributing stones into the opponent's pits. If a stone lands in a pit on the opponent's side and the total number of stones in that pit becomes even (2, 4, 6, 8, etc.), the player collects all the stones in that pit and adds them to their storehouse. Then it's the opponent's turn.
  • If, while distributing stones, the last stone in a player's hand lands in one of their own empty pits, and the opposite pit on the opponent's side contains stones, the player collects the stones from the opponent's pit and the stone they placed in their empty pit, adding them all to their storehouse. Then it's the opponent's turn.
  • The game ends when one player's pits are empty. The player whose side is emptied first also collects all the stones from the opponent's side. Thus, the dynamics of the game remain intense until the very end.

Technologies And Data Structures Used

  • Java
  • Directed Graph
  • Array
  • Two Dimensional Array For Adjacency Matrix
  • Stack Array Implementation
  • DFS Algorithm
  • Scanner
  • Object Oriented Programming
  • switch-case

File Structure

  • src/: Contains the Java source code

About

Mangala is a Turkish strategy game played by two players. The game board consists of 12 small pits, 6 for each player, and a large storehouse where each player collects their stones. The game is played with a total of 48 stones.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages