E-Nera Game Board

About: Studying B.tech in Electronics and communication Engineering at St Thomas college of engineering and Technology , Kannur .

"Nera" (or Nira) is board game which is originated in ancient India like Chess and is still popular in south Indian villages .Nera helps players to develop their strategic and tactical abilities and problem solving skills.It is a two player game played on a board with 9 positions and 3 coins for each player (24 position and 12 coin version is also available). Here I am going to convert this Nera game to an electronic or a digital version.The rules of the game is as simple as that of a Tic Tac Toe game, but the game play is more interesting and challenging,more like a chess game. I think it is first time a person developing an electronic hardware or board for playing Nera game.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: How to Play This Game?

Nera has very simple rule. There are 9 positions and 3 coins for each players are in this game as shown in the figure. Each player wants to move their coins one after another to form a combination of position which can make a line like structure. For example player 1's coins are on positions 1,2,3 or 1,4,5 then he is the winner.Diagonal line forming is also considered in this game (ie.3,5,7 and 1,5,9 is also a line) In Indian regional languages like Malayalam and Tamil , this Nera or Nira means "in a line". Just go through the example video for get an idea on this game.

Step 2: Components Required

We are going to make this game into a digital version by using the Arduino Platform.Very less number of components are required for this board.

  1. Arduino Mega Pro or Arduino Mega
  2. Double side PCB
  3. RGB LED-9 pcs
  4. Press Button-9 pcs
  5. Ribbon Cable
  6. Push button-1
  7. Glue gun
  8. Soldering Tools

Step 3: Wiring the Circuit

Connect the components as shown in the figure above on a double sided PCB. Since we only using 2 colors of lights in this project , the remaining one pin of the RGB LED can be leave as connection less. You can use Push button matrix module for replace the array of switches to made a quick responding board. To simplify the connection just follow this pin initializing code,

"byte player1_led[]={0,1,2,3,4,5,6,7,8}; \\ Connection of Red Anode of the RGB LED"

"byte player2_led[]={9,10,11,12,13,14,15,16,17};\\Connection of Red Anode of the RGB LED"

"byte switches[]={A0,A1,A2,A3,A4,A5,A6,A7,A8};\\array of push buttons"

"byte reset_pin=A9;\\reset pin"

Step 4: Logic in C++

The c++ code given below helps to identify the wining conditions. We just need to implement this on arduino platform. I am not interested in sharing the sketch i wrote for this project, since it is one of the product we are going to launch in market through our startup company.

#include
#include int a[3];

int main()

{

for(int x=0;x<3;x++)

{ std::cin>>a[x]; }

int b[48][3] = { {1,2,3},{1,3,2},{2,1,3},{2,3,1},{3,1,2},{3,2,1},{4,5,6},{4,6,5},

{5,4,6},{5,6,4},{6,4,5},{6,5,4},{7,8,9},{7,9,8},{8,7,9},{8,9,7},

{9,7,8},{9,8,7},{1,4,7},{1,7,4},{4,1,7},{4,7,1},{7,1,4},{7,4,1},

{2,5,8},{2,8,5},{5,2,8},{5,8,2},{8,2,5},{8,5,2},{3,6,9},{3,9,6},

{6,3,9},{6,9,3},{9,3,6},{9,6,3},{1,5,9},{1,9,5},{5,1,9},{5,9,1},

{9,1,5},{9,5,1},{3,5,7},{3,7,5},{5,3,7},{5,7,3},{7,3,5},{7,5,3} };

int i, j;

for (i = 0; i < 48; i++)

{

for (j = 0; j < 3; j++)

{

if (a[j] != b[i][j])

{

break;

}

if ( j == 2)

{

std::cout<<"Nira..!";

return 1;

}

}

}

std::cout<<"Not yet..!";

return 0;

}

Step 5: Testing

Puzzle Challenge

Participated in the
Puzzle Challenge

Be the First to Share

    Recommendations

    • CNC Contest

      CNC Contest
    • Teacher Contest

      Teacher Contest
    • Maps Challenge

      Maps Challenge

    4 Discussions

    0
    None
    Akshay KGAswinP10

    Answer 9 months ago

    There are some bugs in the sketch! Nothing else...I don't have enough time to check and correct them now... Exam Exam Exam ....

    0
    None
    Aric Caley

    9 months ago on Step 5

    I've never heard of this game before, so this is pretty interesting. I wish you could have shared the whole code of the game though!

    I am wondering why didn't you multiplex the button inputs and the LED matrix? You could probably then use just a regular Arduino and the wiring would be simpler. I am sure the code is small enough to fit...

    1 reply
    0
    None
    Akshay KGAric Caley

    Reply 9 months ago

    Hello Sir..! Actually I thought that implementing my logic with , a 3x3 button array and 2X 3x3 LED matrix may make my coding more complex , I think now it is little bit lengthier and easily understandable. Thank you for your suggestion.