Pastebin is annoying like this.
Code:
if(bricks[x1]-1 == 0) //The table is built up with nine slots and the player enters from 1-9, and to make it work with my array I minus one from it so it starts from 0
{
if (bricksnumber[player] < 3) //checks that the player has less than 3 bricks
bricks[x1-1] = briktype;
bricksnumber[player]++;
checkwinner();
}
Could have unintended evaluation because of your tabbing.
Code:
if(bricks[x1]-1 == 0)
{
if (bricksnumber[player] < 3)
{
bricks[x1-1] = briktype;
}
bricksnumber[player]++;
checkwinner();
}