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.
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.