
-----------------------------------
anon656
Thu Jun 08, 2017 6:08 pm

tic tac toe help
-----------------------------------
I am trying to make a two player tic tac toe game but it seems that I cannot figure out how to fill in the spaces with X or O, each time switching when one is entered.

this is my tic tac toe board

var mainWin : int := Window.Open ("position:middle;center,graphics:800;650,nobuttonbar,title:tic-tac-toe")
Draw.ThickLine (300, 100, 300, 550, 10, 7)
    Draw.ThickLine (500, 100, 500, 550, 10, 7)
    Draw.ThickLine (100, 400, 700, 400, 10, 7)
    Draw.ThickLine (100, 250, 700, 250, 10, 7)

-----------------------------------
Insectoid
Thu Jun 08, 2017 6:22 pm

RE:tic tac toe help
-----------------------------------
What have you tried so far?

-----------------------------------
anon656
Thu Jun 08, 2017 6:45 pm

RE:tic tac toe help
-----------------------------------
var  picX,picO,x, y, button : int
picX:=Pic.FileNew ("picX.jpg")
picO:=Pic.FileNew ("picO.jpg")
    Draw.ThickLine (300, 100, 300, 550, 10, 7)
    Draw.ThickLine (500, 100, 500, 550, 10, 7)
    Draw.ThickLine (100, 400, 700, 400, 10, 7)
    Draw.ThickLine (100, 250, 700, 250, 10, 7)   
   loop
       Mouse.Where (x, y, button)
       if button = 1 then
           if x >= 100 and x = 100 and y = 300 and x < 500 and y >= 100 and y = 500 and x < 700 and y >= 100 and y = 100 and x < 300 and y >= 250 and y = 300 and x < 500 and y >= 250 and y = 500 and x < 700 and y >= 250 and y = 100 and x < 300 and y >= 400 and y = 300 and x < 500 and y >= 400 and y = 500 and x < 700 and y >= 400 and y = 100 and x = 100 and y = 300 and x < 500 and y >= 100 and y = 500 and x < 700 and y >= 100 and y = 100 and x < 300 and y >= 250 and y = 300 and x < 500 and y >= 250 and y = 500 and x < 700 and y >= 250 and y = 100 and x < 300 and y >= 400 and y = 300 and x < 500 and y >= 400 and y = 500 and x < 700 and y >= 400 and y = 100 and x = 100 and y = 300 and x < 500 and y >= 100 and y = 500 and x < 700 and y >= 100 and y = 100 and x < 300 and y >= 250 and y = 300 and x < 500 and y >= 250 and y = 500 and x < 700 and y >= 250 and y = 100 and x < 300 and y >= 400 and y = 300 and x < 500 and y >= 400 and y = 500 and x < 700 and y >= 400 and y 