COMP 1 noughts and crosses!! Watch

vice
Badges: 0
#1
Report Thread starter 8 years ago
#1
Can anyone help me write the scores to a text file.
Also i need help on not replacing another players X or O on the chart. All other validation is complete
Thanks
0
reply
diane_h
Badges: 0
Rep:
?
#2
Report 8 years ago
#2
Which programming language are you using? We're using VB.net
0
reply
vice
Badges: 0
#3
Report Thread starter 8 years ago
#3
yeh vb mate
0
reply
vice
Badges: 0
#4
Report Thread starter 8 years ago
#4
anyone?
0
reply
diane_h
Badges: 0
Rep:
?
#5
Report 8 years ago
#5
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!
0
reply
yassir
Badges: 1
Rep:
?
#6
Report 8 years ago
#6
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.
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

University open days

  • University of the Arts London
    MA Design: Ceramics, Furniture or Jewellery Open Day Postgraduate
    Fri, 25 Jan '19
  • Coventry University
    Undergraduate Open Day Undergraduate
    Sat, 26 Jan '19
  • Brunel University London
    Undergraduate Experience Days Undergraduate
    Sat, 26 Jan '19

Are you chained to your phone?

Yes (109)
19.57%
Yes, but I'm trying to cut back (227)
40.75%
Nope, not that interesting (221)
39.68%

Watched Threads

View All