Commander_ACE Junior Member Posts: 7 From: Registered: 02-14-2007 |
Hi, I am relatively new to programming. In Blitz Basic, I have been trying to make a Text-Based Tic-Tac-Toe. But, the PrintBoard() Function keeps repeating and just draws boards straight down the left side of the screen. I would really like to know how to make it stop doing that. Here is the code:
[This message has been edited by Commander_ACE (edited February 16, 2007).] |
|
Mene-Mene![]() Member Posts: 1398 From: Fort Wayne, IN, USA Registered: 10-23-2006 |
Its because you're using print as your out put command, with the print command it adds a amount to a variable within it. ------------------ |
|
Commander_ACE Junior Member Posts: 7 From: Registered: 02-14-2007 |
Any suggestions on how to fix it? | |
Mene-Mene![]() Member Posts: 1398 From: Fort Wayne, IN, USA Registered: 10-23-2006 |
Using double buffers, use the text command. Not sure how to ask for input. Basically do something like this:
You'll notice that the x's and o's disappear right after you click. The problem is that it sets them there, then clears again. See if you can finish from here. ------------------ |
|
Commander_ACE Junior Member Posts: 7 From: Registered: 02-14-2007 |
Thanks. I was using those variables because last time I tried using Text without variables, it wouldn't work ... I thought about using Buffers, but I wanted to try and make the program without them. [This message has been edited by Commander_ACE (edited February 16, 2007).] |
|
Mene-Mene![]() Member Posts: 1398 From: Fort Wayne, IN, USA Registered: 10-23-2006 |
Curious why you would want to not want to you multiple buffers? ------------------ |
|
Commander_ACE Junior Member Posts: 7 From: Registered: 02-14-2007 |
I guess I just didn't want to... I'll try it though. [This message has been edited by Commander_ACE (edited February 16, 2007).] |
|
Commander_ACE Junior Member Posts: 7 From: Registered: 02-14-2007 |
Thanks for the code, all I had to do was take Cls out of the program and it worked. |