Congklak

Congklak_custom allows user to play Congklak game (a traditional) in MATLAB GUI against a simple AI.
584 Downloads
Updated 27 Apr 2012

View License

Congklak_custom allows user to play Congklak game (a traditional) in MATLAB GUI against a simple AI.

How to play Congklak:
Each player takes turn to play seeds/bean from his/her house (house is a small holes on both player's side of the board). Playing seed is done by selecting a house on player's side, taking all beans in it, and moving it forward in counterclockwise direction by putting one seed on all houses that it passes through except the opponent storehouse (store house is a big hole on the left and the right side of the board, each representing player's score). If the last seed falls on a non-empty house, player
%continues its turn by taking all seeds in it and moving it forward again. If the last seed falls on the player's storehouse, player can continue his turn by playing new seed from any houses on player's side. If the last seed falls on an empty house on player's side, player takes all seed in player's house (whose last seed falls in it) and in the opposing house on opponent side to player's storeroom. This is called shooting and this ends player's turn. If the last seed falls on an empty house on opponent's side, player ends turns without shooting. Playing seed is done repeatedly by both player in turns until all seeds in all houses are taken. In the
%end of the game, player with most seeds in his storehouse wins the game.

Cite As

Stepen Sahrun (2024). Congklak (https://www.mathworks.com/matlabcentral/fileexchange/36427-congklak), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on App Building in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0