it's a multiplayer game when your goal is to capture the maximum of territory and avoid to be killed or killed by yourself.
To play BISC
Commands: Player1 : arrow keys, up , down, left, right Player2 : WASD, w=up, s=down, a=left, d=right -> Press enter on the Menu After 3 seconds the game will start
Your Goal ?
- Capture more terrain than your opponent and avoid dying.
How to capture ?
- Make a path on the grid , and reach back a territory you already captured. Everything inside the polygon you've draw will be yours !
- Each square captured is one point, the player to win is the one with the higher score
How to die ? (end the game)
- Reach out the border
- Cut your own capturing line
- Your own capturing line is cut by the other player
Once the game is over , you can see all players scores -> Press enter to go back to the menu -> Press escape to quit the program
The arena is a grid, an array of arrays, containing values, representing the status of each cell (free, captured by a player, tail of a player, etc.) An arena object is created with the wanted size. Each player moves into the arena, by incrementing or decrementing x and y values of his position in the grid:- If the player's position gets out of the array, the game is over for him.
- If the player's position is in a cell that contains his own tail, the game is over for him
- If the player's position is in a cell containing another player's tail, the game is over for the other player
- If the player's position corresponds to a cell already captured by himself, it triggers the floodFill() function
- starting position
- current position: position of the player after having moved
- last position
- direction: direction in which the player is moving
- last direction
- score: number of captured cells
- game over: if the player has lost, this value is true
The GameDisplay Class is the Class who will generate all Graphical content of the game based on all the data we've in the other classes.
Once Created , the Arena Array is cropped to be used and drawed later. All Color and font are declared and a new Fungraphic Instance is created.
gamePaintClock, is the method called every frame to redraw the entire arena , based on the values of the Arena.grid Array. It also draw the black separation lines. (note: it can be optimized to avoid flickering). Its basicly a loop that take the array , amplify with a choosen factor, and draw a grid of the right dimension , the size depends of the choosen factor.
menuScreen, pauseScreen, launchScreen and gameOverScreen , are methods used and called whenever we need to display each specific state of the game.
This class is responsible for listening to the keyboard inputs and returning the direction to each player. At first, the Arena object is created, with the desired size (only one value, the arena is always a square). Then a new GameDisplay object is created : this object is responsible for the graphic part. A mainKeyboard object is created : this object will listen to keyboard inputs not related to a specific player. The players are now created, with their ID, starting position, and a keyboard listener. As long as we want to play, we stay in that loop. The menu is displayed, followed by th launching sequence. As long as no player has made a terrible mistake, we stay in this loop. This code is where the main action of the game happens, and it loops through the array of players : for each player, the following actions are executed :- displaying the grid
- getting the player's last direction and his keyboard input
- make the player move
- executing the action based on the position of the player and the content of the cell
- floodFill if the player closes his perimeter
- game over if he hits his own tail
- game over for the other player if he hits the other player's tail
- sets the tail of the player (cells that are not yet captured)



