It seems i have a basic problem understanding how you guys separate the game logic between each room.
you declare few variables under the main class SFSTrisGame
one of them is a single instance of the gameboard
Code: Select all
private TrisGameBoard gameBoard;
under the init function you instantiate the board which mean we only have 1 instance of that board
Code: Select all
public void init()
{
gameBoard = new TrisGameBoard();
}
now i guess what im trying to understand is this : When users create different room games, they use the same gameBoard instance in the server? or this variable is initiated for each room?