New User?   Join Now     Login            Forgot Password?    
Browse by Category
Browse Projects
XamlQuery v1.2
Browse Topics
BrainBoard for Java Mobiles  (8102 hits)
 Share this Article
Posted by Prabu Arumugam on Jun-10-2010
Languages: Java, J2ME

What is BrainBoard?

BrainBoard is an addictive single-player board game for brain training. It is a modified version of classical Peg Solitaire game This article explains the game concepts and also the programming concepts used during development of the game in J2ME. You can download the full sourcecode of this game below.

A Silverlight version of this game is available here, with source code and live playable demo.


This game is developed as a learning curve for J2ME. The original name of the game is Peg Solitaire; it is also referred to as "Brainvita". This modified version is named differently in different regions. But BrainBoard is developed as a learning curve for J2ME programming and full source code is released here. This game is released in the following websites also.

The board layout of BrainBoard is much difficult to solve than the original board layout of Peg Solitaire. This makes this game very addictive. Also, it is not yet sure whether the number of pebbles can be reduced to less than two in the game.

If anybody can achieve one pebble at end of the game, please comment in this article.

BrainBoard vs Peg Solitaire

The original Peg Solitaire board uses 7x7 matrix and removes 2x2 matrix in all four corners. BrainBoard uses 9x9 matrix and removes 3x3 matrix in all four corners. BrainBoard contains 45 holes, whereas Peg Solitaire contains 33 holes. Before the game starts, the initial board of Peg Solitaire contains 32 pegs with an empty hole at the center, whereas BrainBoard game starts with 36 pebbles and 9 empty holes.

The following matrix illustrates the initial board layout of BrainBoard. 0 indicates empty hole.


The following matrix illustrates the initial board layout of classic Peg Solitaire.


How to Play

The objective of the game is to remove as much pebbles/pegs as you can. You can remove a pebble by moving any of its nearby pebble to a nearby empty cell/hole. In other words, if you replace a pebble from its position to a nearby empty cell, the middle pebble is removed. For more information, see

BrainBoard Screenshots

Main Menu Board Layout
Last Move Highscores

(These screenshots were taken in J2ME Wireless Toolkit 2.2)

 Downloads for this article
File Language Tools
BrainBoard-J2ME-Source  6.98 kb  (79 downloads) J2ME J2ME WTK 2.2
BrainBoard.jar  7.29 kb  (52 downloads)

 Share this Article

 Comments on this Article
Comment by anhlavodoinb1 on Aug-16-2013
Comment by Zeeshan on Jun-19-2010
i have tried my best to solve this but 2 left is the best i came with can you tell me how to solve it so that only 1 is left in the centre. thanx
 Post your comment here
Your Name
Your Email
Post Comment

About About      Terms Terms      Contact Contact
codeding on Facebook Facebook      codeding on Twitter Twitter