im not sure where to post this so i will post it here. I coded this in about 30 minutes and it is my first proper demo.
` code fo simple two player tic,tac,toe game
` written bye jamie lewis
sync on
sync rate 0
cls
dim square(3,3)
for x = 1 to 9
load image "tic.bmp",x
next x
for x =10 to 19
load image "tac.bmp",x
next x
for x = 20 to 28
load image "toe.bmp",x
next x
square(1,1)=0
square(1,2)=0
square(1,3)=0
square(2,1)=0
square(2,2)=0
square(2,3)=0
square(3,1)=0
square(3,2)=0
square(3,3)=0
rem main loop
do
cls
rem print
set cursor 400,400
print x
set cursor 400,410
print y
set cursor 240,50
Print "TIC TAC TOE a game bye Jamie"
set cursor 470,100
print "make sure your mouse"
set cursor 470,125
print "is lined up to the top "
set cursor 470,150
print "left side of the square"
rem find mouse position
x = mousex()
y = mousey()
rem paste tic
paste image 1,100,100
paste image 2,200,100
paste image 3,300,100
paste image 4,100,200
paste image 5,200,200
paste image 6,300,200
paste image 7,100,300
paste image 8,200,300
paste image 9,300,300
rem control for tac
if mouseclick()=1 and x = 100 and y = 100
square(1,1)=1
endif
if mouseclick()=1 and x = 200 and y = 100
square(1,2)=1
endif
if mouseclick()=1 and x = 300 and y = 100
square(1,3)=1
endif
if mouseclick()=1 and x = 100 and y = 200
square(2,1)=1
endif
if mouseclick()=1 and x = 200 and y = 200
square(2,2)=1
endif
if mouseclick()=1 and x = 300 and y = 200
square(2,3)=1
endif
if mouseclick()=1 and x = 100 and y = 300
square(3,1)=1
endif
if mouseclick()=1 and x = 200 and y = 300
square(3,2)=1
endif
if mouseclick()=1 and x = 300 and y = 300
square(3,3)=1
endif
rem array images for tac
if square(1,1)=1
paste image 10,100,100
endif
if square(1,2)=1
paste image 11,200,100
endif
if square(1,3)=1
paste image 12,300,100
endif
if square(2,1)=1
paste image 13,100,200
endif
if square(2,2)=1
paste image 14,200,200
endif
if square(2,3)=1
paste image 15,300,200
endif
if square(3,1)=1
paste image 16,100,300
endif
if square(3,2)=1
paste image 17,200,300
endif
if square(3,3)=1
paste image 18,300,300
endif
rem control for tac
if mouseclick()=2 and x = 100 and y = 100
square(1,1)=2
endif
if mouseclick()=2 and x = 200 and y = 100
square(1,2)=2
endif
if mouseclick()=2 and x = 300 and y = 100
square(1,3)=2
endif
if mouseclick()=2 and x = 100 and y = 200
square(2,1)=2
endif
if mouseclick()=2 and x = 200 and y = 200
square(2,2)=2
endif
if mouseclick()=2 and x = 300 and y = 200
square(2,3)=2
endif
if mouseclick()=2 and x = 100 and y = 300
square(3,1)=2
endif
if mouseclick()=2 and x = 200 and y = 300
square(3,2)=2
endif
if mouseclick()=2 and x = 300 and y = 300
square(3,3)=2
endif
rem arrays for toe
if square(1,1)=2
paste image 20,100,100
endif
if square(1,2)=2
paste image 21,200,100
endif
if square(1,3)=2
paste image 22,300,100
endif
if square(2,1)=2
paste image 23,100,200
endif
if square(2,2)=2
paste image 24,200,200
endif
if square(2,3)=2
paste image 25,300,200
endif
if square(3,1)=2
paste image 26,100,300
endif
if square(3,2)=2
paste image 27,200,300
endif
if square(3,3)=2
paste image 28,300,300
endif
if spacekey()=1
end
endif
sync
loop
any comments would be great and i hope it helps some people. Note it includes some simple media just open up a paint proggey and make a simple empty square ,one with a cross and one with a circle and call then tic tac and toe. leftclick for circle and right click for cross. Ok thanx
Darkworlds are all around us just open your eyes
Most of us are still half asleep