# Gomoku (5 in a row) board game

**URL:** <https://forum.kirupa.com/t/gomoku-5-in-a-row-board-game/328311>\
**Category:** Uncategorized\
**Created:** [May 7, 2012, 12:53am UTC](https://forum.kirupa.com/t/gomoku-5-in-a-row-board-game/328311 "2012-05-07T00:53:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Iamgavin](https://avatars.discourse-cdn.com/v4/letter/i/41988e/32.png) [@Iamgavin](https://forum.kirupa.com/u/Iamgavin)\
**Post date:** [May 7, 2012, 12:53am UTC](https://forum.kirupa.com/t/gomoku-5-in-a-row-board-game/328311/1 "2012-05-07T00:53:56Z")

</div>

Hey there. I’m struggling to make a board game and need some help.  
This is my first game so I’m pretty stuck. (I wish I’d picked a shoot-em up or something)

So far I’ve got three frames, the first is the start page, the second is for playing against the computer and the third is for 2 player.

```auto
 
    
var mainBoard:Array = new Array();
mainBoard.push(new Array());
var level1:Array = new Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);
var level2:Array = new Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);
var level3:Array = new Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);
var level4:Array = new Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);
var level5:Array = new Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);
var level6:Array = new Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);
var level7:Array = new Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);
var level8:Array = new Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);
var level9:Array = new Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);
var level10:Array = new Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);
var level11:Array = new Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);
var level12:Array = new Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);
var level13:Array = new Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);
var level14:Array = new Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);
var level15:Array = new Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);

mainBoard[0].push(level1, level2, level3, level4, level5, level6, level7, level8, level9, level10, level11, level12, level13, level14, level15);

var path:int = 0;

var tileWidth:int = 35;
var tileHeight:int = 35;
var tileSpacing:int = 1;

for (var k in mainBoard[0]) 
{
    for (var i in mainBoard[0][k][0])
    {
        var square:Shape = new Shape();
        var squareMC:MovieClip = new MovieClip();
        if (mainBoard[0][k][0]* == path)
        {
            square.graphics.beginFill(0x9CD55E);
            square.graphics.drawRect(168, 90, tileWidth, tileHeight);
            square.graphics.endFill();

        } 
        squareMC.addChild(square);
        squareMC.x = (i * (tileWidth + tileSpacing + tileSpacing)) + tileSpacing;
        squareMC.y = (k * (tileHeight + tileSpacing + tileSpacing)) + tileSpacing;
        addChild(squareMC);
    }
}

        

```

I really have no idea where to go from here. Am I going the right away about this?  
Thanks in advance for any help offered.
