Hello all,
This is a game i made in the BASIC language several years back. Now, I want to code it using
jsp and
servlet. It works just like the '3 IN A ROW ' app.
Here is the general idea:
At the start of the game, a page containing numbers running from 1 to 9 is displayed on the screen in the form of a cross as shown below.
The game is played by 2 players. Each of them is represented by an image. They are asked where to go on the cross in a successive manner. For instance if Player 1 says he wants to go to number 8 on the cross, its corresponding image is loaded at position 8 of the cross. They are required to fill 3 positions on the cross and from there they can start moving on the cross. The sole objective of each player is to align its 3 images. A player can only move on its immediate position(right or left) and he cannot move onto an occupied position.
I plan to have the following tables:
Player1
position int(1)
Player2
position int(1)
AllowedMoves
moveFrom int(1)
moveTo int(1)
WinCombinations
win varchar(3)
But my first question is:
How do i load an image at a position chosen by a player on the cross?
Kind regards.