DEV Community

Cover image for JavaScript - Mancala
Kyle A.
Kyle A.

Posted on • Edited on

JavaScript - Mancala

Classic Mancala Game accessible for Desktop & Mobile play.



Languages:

  1. HTML
  2. Javascript
  3. CSS

Desktop

Mancala gameplay

Play the Game: https://kylestech95.github.io/mancala-game/
Source Code: https://github.com/KylesTech95/mancala-game
Clone Ref: https://github.com/KylesTech95/mancala-game.git

Mobile (Portrait)

portrait mode mobile

Play the Game: https://kylestech95.github.io/mancala-game/
Source Code: https://github.com/KylesTech95/mancala-game
Clone Ref: https://github.com/KylesTech95/mancala-game.git

Mobile (Landscape)

Landscape mode mobile

Play the Game: https://kylestech95.github.io/mancala-game/
Source Code: https://github.com/KylesTech95/mancala-game
Clone Ref: https://github.com/KylesTech95/mancala-game.git

Features

  • Never-ending Fun
  • Score Tracking
  • Instructions
  • Automatic Computer play
  • Touch & mouse click

Setup:

  1. Both you and the computer have 6 "Holes" or "Pits" on your perspective side
  2. Each pit starts with 4 marbles
  3. The colors of the marbles do not mean anything
  4. Both players are given a "goal" or a "Mancala" to the right of board.

Object:
The goal is to collect as many marbles in your "goal" by the end of the game

Gameplay:

  1. The game starts with you (Player) choosing a "pit" in order to grab all of your marbles
  2. Moving counter-clockwise, you place of stone in your hand into each pocket until the stones run out
  3. If you run into your own Mancala (goal), deposit one piece in it. If you run into the computer's Mancala, skip it and continue moving to the next pocket.
  4. Consistenly aim to place as many marbles as you can in your goal
  5. If you drop the last marble (in your hand) into the goal, play again
  6. The game ends when all six pockets on one side of the Mancala board are empty (Computer side or Player side)
  7. The currnet player who still has pieces on their side of the board when the game ends captures all of those pieces.
  8. Count all the pieces in each Mancala
  9. The winner is the player with the most pieces

Top comments (0)