The Student Room Group
Reply 1
Which programming language are you using? We're using VB.net
Reply 2
yeh vb mate
Reply 3
anyone?
Reply 4
Well from memory I did this:
In the subroutine where you are checking that the co-ordinates are between 1 and 3, add this line

do while Board(XCoord,YCoord) <> " "
console.write("Error. Try Again: ")
console.write("X Coord: ") : xCoord=console.readline
console.write("YCoord: ") : ycoord=console.readline
loop

Hope it helps!
Reply 5
In order to stop players clicking on squares already occupied by a O or an X set the square to locked after being used. This will be something like 'square.Enabled = false'. I made this game using Visual Basic for fun few years ago.

Latest

Trending

Trending