Cocos2d-JS: Edward de Bono’s L Game

With recently acquired game development skills with Javascript, I tried to work on another simple project. This time, it is a simple board game which is called L game.

L game

The L game was invented by Edward de Bono, who is the author of the book Six Thinking Hats
and also the originator of the term Lateral Thinking.

Six Thinking Hats

The six-thinking-hats is a practical thinking tool for humans to direct their attention into certain areas and let their ideas flow without any premature judgement when exploring new ideas. It is a software for human mind. The six thinking hats come in six different colors where white is for the neutral and factual thinking, green is for the creative thinking, red is for the emotional thinking, black is for the negative and cautious thinking, yellow is for the positive thinking and blue is for the cool and organizing thinking.

Lateral Thinking: Creativity Step by Step (Perennial Library)

Lateral thinking was first coined by Edward de Bono in the 1960s. According to him, traditional and conventional thinking has always been criticizing somethings. People remove and reject what are wrong until they reach a point where nothing else can be removed and called it the truth. They reach a conclusion by criticizing and by using logic … which is excellent. But anything is logical by hindsight, said Edward de Bono. This critical thinking is vertical and dangerous if used alone. Based on the author, we need another mode of thinking, which is the lateral thinking, to complement the excellent vertical thinking.

L game is a two-player game played on a 4×4 board. There are only two types of pieces. The first type is the 2×3 L-shape piece and there are only two pieces of L on the board. It is also why the game is called L game. The second type is the 1×1 dot piece and there are also two pieces of dot on the board.

Each player takes turn to change his/her L position (either the red or the blue L) and the L must be in different position than the initial position. Then he/she can move the one of the dot to any empty square or skip by giving up the right to move the dot.

The goal is to block the opponent until there is no more move for the opponent where the game ends and a winner is determined.

The game is being described in detail in this book The 5-Day Course in Thinking.

The 5-Day Course in Thinking

This book allows readers to find out their own thinking style by solving a series of problems that require no special knowledge and no mathematics. Edward de Bono stressed that being right is not always important since an error can lead to the right decision. The L game can be found in the book as an exercise.

In Edward de Bono’s own words,

The intention was to produce the simplest possible game that could be played with a high degree of skill. An attempt (L game) was made to fulfil the following conditions:

  1. A minimum number of playing pieces, preferably one each.
  2. The smallest possible board.
  3. A game with very few rules, one that would be very simple to learn and play.
  4. A game that could be played with a high degree of skill.
  5. A game that would not be determinate. A determinate game such as nim or noughts and crosses, is one in which the starting player could always win if he knew the strategy. An indeterminate game is one which two perfect players would play for ever.


The motivation behind developing this game is that there are not many people doing it. I can only find one web version, one Apple store version and one Google Play version. And that’s it. Probably the game is not that popular. Still, I decided to make my version of it.

Another reason is to practice new skills on simple project. This game is simple enough for this purpose. You can learn more about the game from the wikipedia.


Once again, I am using the open-source Cocos2d-JS game engine for this project.

It took me 3 days to complete the minimal-viable-product. 60 % of the time was used to understand the detail of the game’s dynamic like:

  • how to determine a valid move (it is not that obvious as I initially thought),
  • how to calculate all the valid moves,
  • how to allow player to undo steps,
  • how to write a simple AI (Artificial Intelligence) to play against human or even with AI itself,
  • etc.

There is no sound at all for this version to save the development time.

Final result

L Game

L Game

My version of L game is available on the web here.

It is also available on Google Play.

Get it on Google Play

Get it on Google Play

What I like about the game is the capability to allow the computer to play against the computer. It is really amazing to look at game played automatically by the robot. I admit I spent most of the time watching the computer playing the game on automation. It almost seems like it has a life of its own.


You can try the game below.