
-----------------------------------
slipstream
Wed Jan 25, 2006 5:29 pm

Help with Tic Tac Toe game
-----------------------------------
alright im still trying to get the buttons to work so im trying something new. What i need to know is how to make it so that when i push the Number 1 key it'll draw a X at a certain spot.
all i know how to set something similiar to this is when u push the arrow keys but i dont know how to set it for the number keys.
this is what i got for arrow keys

     

Var Key:array char of boolean
        if key (LEFT_BUTTON) then
        draw X
        drawline (100,100,175,175,blue)
        drawline (100,175,175,100,blue)

I chose to just draw out the line other than useing Font but i just need help how to identify the number keys or even the first 9 letters of the alphebet. Do i just replace the (LEFT_BUTTON) with (1)????


-----------------------------------
person
Wed Jan 25, 2006 5:37 pm


-----------------------------------
yes, just replace it with the key u want

-----------------------------------
slipstream
Wed Jan 25, 2006 7:49 pm


-----------------------------------
hmm its saying Draw is not a procedure and hence cannot be called..
how i fix this?

-----------------------------------
person
Wed Jan 25, 2006 8:33 pm


-----------------------------------
use Font.Draw
if u dont know wat it is, F10 it

-----------------------------------
slipstream
Wed Jan 25, 2006 8:55 pm


-----------------------------------
i cant figure wats wrong...when i push the right arrow key the X still dont appear...what am i missing? 


var keys:array char of boolean
    if keys (KEY_RIGHT_ARROW) then
    drawline (110,110,145,145,blue)
    drawline (110,145,145,110,blue)
    end if

-----------------------------------
person
Wed Jan 25, 2006 8:58 pm


-----------------------------------
look at ur code and tell me y it doesnt compile

-----------------------------------
slipstream
Wed Jan 25, 2006 9:09 pm


-----------------------------------
i need to declare the arrow keys??? but what if i dont wanna use the arrow keys and i want to use numbers instead??? how will that work?

-----------------------------------
person
Wed Jan 25, 2006 9:14 pm


-----------------------------------
1) an if statement checks if a condition is true
2) arrow keys and any char on the keyboard are the same concept
3) no offense, but i think making tic-tac-toe may be too advanced for ur level
4) look up these in F10 or tutorials in compsci: Input.KeyDown; Decision Structures
