This is a Java implementation of the Oware board game.
Oware is an abstract strategy game among the Mancala family of board games (pit and pebble games) played worldwide with slight variations as to the layout of the game, number of players and strategy of play. Its origin is uncertain, but it is widely believed to be of Ashanti origin.
The game requires an oware board and 48 seeds. A typical oware board has two straight rows of six pits, called "houses", and optionally one large "score" house at either end. Each player controls the six houses on their side of the board, and the score house on their end. The game begins with four seeds in each of the twelve smaller houses.
Boards may be elaborately carved or simple and functional; they may include a pedestal, or be hinged to fold lengthwise or crosswise and latch for portability and storage with the seeds inside. While most commonly located at either end, scoring houses may be placed elsewhere, and the rows need not be straight. When a board has a hinged cover like a diptych, the scoring houses may be carved into the two halves of the cover, and so be in front of the players during play. The ground may also be used as a board; players simply scoop two rows of pits out of the earth.
In the Caribbean, the seeds are typically nickernuts, which are smooth and shiny. Beads and pebbles are also sometimes used. In the West, some cheaper sets use oval-shaped marbles. Some tourist sets use cowrie shells.
The game starts with four seeds in each house. The objective of the game is to capture more seeds than one's opponent. Since the game has only 48 seeds, capturing 25 is sufficient to win the game. Since there is an even number of seeds, it is possible for the game to end in a draw, where each player has captured 24.
Players take turns moving the seeds. On a turn, a player chooses one of the six houses under their control. The player removes all seeds from that house, and distributes them, dropping one in each house counter-clockwise from this house, in a process called sowing. Seeds are not distributed into the end scoring houses, nor into the house drawn from. The starting house is always left empty; if it contained 12 (or more) seeds, it is skipped, and the twelfth seed is placed in the next house. The diagram shows the result of sowing from house E.
Knowing the number of seeds in each house is, of course, important to game play. When there are many seeds in a house, sometimes enough to make a full lap of the board or more, they cannot easily be counted by eye, and their number is often guarded by the player who controls that house. This may be done by repeatedly moving the seeds in the house. A player may count the seeds when contemplating a move; in such cases the last few are usually counted in the hand to avoid revealing their number.
In Oware Abapa, capturing occurs only when a player brings the count of an opponent's house to exactly two or three with the final seed he sowed in that turn. This always captures the seeds in the corresponding house, and possibly more: If the previous-to-last seed also brought an opponent's house to two or three, these are captured as well, and so on until a house is reached which does not contain two or three seeds or does not belong to the opponent. The captured seeds are placed in the player's scoring house (or set aside if the board has no scoring houses). However, if a move would capture all of an opponent's seeds, the capture is forfeited since this would prevent the opponent from continuing the game, and the seeds are instead left on the board. (However, see discussion on Grand Slam variations below). In the adjacent diagram, the lower player would capture all the seeds in houses e, d, and c but not b (as it has four seeds) or a (since it is not contiguous to the other captured houses).
Let the opponent play [Wiki]
The proscription against capturing all an opponent's seeds is related to a more general idea, that one ought to make a move that allows the opponent to continue playing. If an opponent's houses are all empty, the current player must make a move that gives the opponent seeds. If no such move is possible, the current player captures all seeds in his/her own territory, ending the game.
The game is over when one player has captured 25 or more seeds, or each player has taken 24 seeds (draw). If both players agree that the game has been reduced to an endless cycle, the game ends when each player has seeds in his holes and then each player captures the seeds on their side of the board.
How to run the game
Clone the project to your workspace and cd into the corresponding directory containing the project:
And then to compile the progam:
And finally to run the game:
- Noah-Vincenz Noeh
See also the list of contributors who participated in this project.