Currently I'm trying to get it so that every single spot used on the grid is put into a DIM statement. Heres the program:
Code:
SET WINDOW 1,11,1,-11
LIBRARY "GOC.trc"
DECLARE DEF G_Click
dim apntx(500)
Dim apnty(500)
dim dpntx(500)
dim dpnty(500)
dim apnt2x(500)
dim apnt2y(500)
dim dpnt2x(500)
dim dpnt2y(500)
SUB graph
CALL base1p1
CALL base4p2
!Vertical Lines
PLOT 1,12;1,-12
PLOT 2,11;2,-11
PLOT 3,11;3,-11
PLOT 4,11;4,-11
PLOT 5,11;5,-11
PLOT 6,11;6,-11
PLOT 7,11;7,-11
PLOT 8,11;8,-11
PLOT 9,11;9,-11
PLOT 10,11;10,-11
!Horizontal Lines
PLOT 11,0;-11,0
PLOT 11,-2;-11,-2
PLOT 11,-4;-11,-4
PLOT 11,-6;-11,-6
PLOT 11,-8;-11,-8
PLOT 11,-10;-11,-10
END SUB
CALL graph
!Turn 1
LET apntx(x)=1.2
LET apnty(y)=-8.5
LET dpntx(x)=1.2
LET dpnty(y)=-8.5
SUB turn1
GET MOUSE x,y,s
SELECT CASE s
CASE 0
CASE 2
CASE 3
!First column
IF x>1 and x<1.9 and y > -8.5 and y <-6.4 then
LET dpntx(x)=1.2
LET dpnty(y)=-6.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x>1 and x<1.9 and y> -6.5 and y<-4.4 then
LET dpntx(x)=1.2
LET dpnty(y)=-4.2
CALL g_create(DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x>1 and x<1.9 and y>-4.5 and y< -2.4 then
LET dpntx(x)=1.2
LET dpnty(y)=-2.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
END IF
!Second Column
IF x> 2 and x<2.9 and y>-10.2 and y<-8.2 then
LET dpntx(x)=2.2
LET dpnty(y)=-8.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 2 and x<2.9 and y>-6.2 and y<-4.2 then
LET dpntx(x)=2.2
LET dpnty(y)=-4.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 2 and x<2.9 and y>-8.5 and y< -6.2 then
LET dpntx(x)=2.2
LET dpnty(y)=-6.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 2 and x<2.9 and y>-4.2 and y<-2.2 then
LET dpntx(x)=2.2
LET dpnty(y)=-2.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 2 and x<2.9 and y>-2.2 and y<-.2 then
LET dpntx(x)=2.2
LET dpnty(y)=-.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
END IF
!Third Column
IF x> 3 and x<3.9 and y>-10.5 and y< -8.2 then
LET dpntx(x)=3.2
LET dpnty(y)=-8.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 3 and x<3.9 and y>-8.5 and y< -6.2 then
LET dpntx(x)=3.2
LET dpnty(y)=-6.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 3 and x<3.9 and y>-6.2 and y<-4.2 then
LET dpntx(x)=3.2
LET dpnty(y)=-4.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 3 and x<3.9 and y>-4.2 and y<-2.2 then
LET dpntx(x)=3.2
LET dpnty(y)=-2.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 3 and x<3.9 and y>-2.2 and y<-.2 then
LET dpntx(x)=3.2
LET dpnty(y)=-.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
END IF
!Fourth Column
IF x> 4 and x<4.9 and y>-10.5 and y< -8.2 then
LET dpntx(x)=4.2
LET dpnty(y)=-8.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 4 and x<4.9 and y>-8.5 and y< -6.2 then
LET dpntx(x)=4.2
LET dpnty(y)=-6.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 4 and x<4.9 and y>-6.2 and y<-4.2 then
LET dpntx(x)=4.2
LET dpnty(y)=-4.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 4 and x<4.9 and y>-4.2 and y<-2.2 then
LET dpntx(x)=4.2
LET dpnty(y)=-2.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 4 and x<4.9 and y>-2.2 and y<-.2 then
LET dpntx(x)=4.2
LET dpnty(y)=-.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
END IF
!Fifth Column
IF x> 5 and x<5.9 and y>-10.5 and y< -8.2 then
LET dpntx(x)=5.2
LET dpnty(y)=-8.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 5 and x<5.9 and y>-8.5 and y< -6.2 then
LET dpntx(x)=5.2
LET dpnty(y)=-6.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 5 and x<5.9 and y>-6.2 and y<-4.2 then
LET dpntx(x)=5.2
LET dpnty(y)=-4.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 5 and x<5.9 and y>-4.2 and y<-2.2 then
LET dpntx(x)=5.2
LET dpnty(y)=-2.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 5 and x<5.9 and y>-2.2 and y<-.2 then
LET dpntx(x)=5.2
LET dpnty(y)=-.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
END IF
!Sixth Column
IF x> 6 and x<6.9 and y>-10.5 and y< -8.2 then
LET dpntx(x)=6.2
LET dpnty(y)=-8.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 6 and x<6.9 and y>-8.5 and y< -6.2 then
LET dpntx(x)=6.2
LET dpnty(y)=-6.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 6 and x<6.9 and y>-6.2 and y<-4.2 then
LET dpntx(x)=6.2
LET dpnty(y)=-4.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 6 and x<6.9 and y>-4.2 and y<-2.2 then
LET dpntx(x)=6.2
LET dpnty(y)=-2.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 6 and x<6.9 and y>-2.2 and y<-.2 then
LET dpntx(x)=6.2
LET dpnty(y)=-.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
END IF
!Seventh Column
IF x> 7 and x<7.9 and y>-10.5 and y< -8.2 then
LET dpntx(x)=7.2
LET dpnty(y)=-8.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 7 and x<7.9 and y>-8.5 and y< -6.2 then
LET dpntx(x)=7.2
LET dpnty(y)=-6.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 7 and x<7.9 and y>-6.2 and y<-4.2 then
LET dpntx(x)=7.2
LET dpnty(y)=-4.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 7 and x<7.9 and y>-4.2 and y<-2.2 then
LET dpntx(x)=7.2
LET dpnty(y)=-2.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 7 and x<7.9 and y>-2.2 and y<-.2 then
LET dpntx(x)=7.2
LET dpnty(y)=-.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
END IF
!Eigth Column
IF x> 8 and x<8.9 and y>-10.5 and y< -8.2 then
LET dpntx(x)=8.2
LET dpnty(y)=-8.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 8 and x<8.9 and y>-8.5 and y< -6.2 then
LET dpntx(x)=8.2
LET dpnty(y)=-6.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 8 and x<8.9 and y>-6.2 and y<-4.2 then
LET dpntx(x)=8.2
LET dpnty(y)=-4.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 8 and x<8.9 and y>-4.2 and y<-2.2 then
LET dpntx(x)=8.2
LET dpnty(y)=-2.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 8 and x<8.9 and y>-2.2 and y<-.2 then
LET dpntx(x)=8.2
LET dpnty(y)=-.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
END IF
!Ninth Column
IF x> 9 and x<9.9 and y>-10.5 and y< -8.2 then
LET dpntx(x)=9.2
LET dpnty(y)=-8.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 9 and x<9.9 and y>-8.5 and y< -6.2 then
LET dpntx(x)=9.2
LET dpnty(y)=-6.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 9 and x<9.9 and y>-6.2 and y<-4.2 then
LET dpntx(x)=9.2
LET dpnty(y)=-4.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 9 and x<9.9 and y>-4.2 and y<-2.2 then
LET dpntx(x)=9.2
LET dpnty(y)=-2.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 9 and x<9.9 and y>-2.2 and y<-.2 then
LET dpntx(x)=9.2
LET dpnty(y)=-.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
END IF
!Tenth Column
IF x>10 and x<10.9 and y>-8.5 and y< -6.2 then
LET dpntx(x)=10.2
LET dpnty(y)=-6.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 10 and x<10.9 and y>-6.2 and y<-4.2 then
LET dpntx(x)=10.2
LET dpnty(y)=-4.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 10 and x<10.9 and y>-4.2 and y<-2.2 then
LET dpntx(x)=10.2
LET dpnty(y)=-2.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 10 and x<10.9 and y>-2.2 and y<-.2 then
LET dpntx(x)=10.2
LET dpnty(y)=-.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
END IF
END SELECT
GET KEY a
END SUB
!P1 Turn
SUB P1Turn
PLOT TEXT, AT 1.2,-10: "Player 1 Turn"
GET KEY a
IF a=50 then
GET MOUSE x,y,s
SELECT CASE s
CASE 0
CASE 2
CASE 3
!First column
IF x>1 and x<1.9 and y > -8.5 and y <-6.4 then
LET dpntx(x)=1.2
LET dpnty(y)=-6.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x>1 and x<1.9 and y> -6.5 and y<-4.4 then
LET dpntx(x)=1.2
LET dpnty(y)=-4.2
CALL g_create(DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x>1 and x<1.9 and y>-4.5 and y< -2.4 then
LET dpntx(x)=1.2
LET dpnty(y)=-2.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
END IF
!Second Column
IF x> 2 and x<2.9 and y>-10.2 and y<-8.2 then
LET dpntx(x)=2.2
LET dpnty(y)=-8.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 2 and x<2.9 and y>-6.2 and y<-4.2 then
LET dpntx(x)=2.2
LET dpnty(y)=-4.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 2 and x<2.9 and y>-8.5 and y< -6.2 then
LET dpntx(x)=2.2
LET dpnty(y)=-6.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 2 and x<2.9 and y>-4.2 and y<-2.2 then
LET dpntx(x)=2.2
LET dpnty(y)=-2.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 2 and x<2.9 and y>-2.2 and y<-.2 then
LET dpntx(x)=2.2
LET dpnty(y)=-.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
END IF
!Third Column
IF x> 3 and x<3.9 and y>-10.5 and y< -8.2 then
LET dpntx(x)=3.2
LET dpnty(y)=-8.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 3 and x<3.9 and y>-8.5 and y< -6.2 then
LET dpntx(x)=3.2
LET dpnty(y)=-6.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 3 and x<3.9 and y>-6.2 and y<-4.2 then
LET dpntx(x)=3.2
LET dpnty(y)=-4.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 3 and x<3.9 and y>-4.2 and y<-2.2 then
LET dpntx(x)=3.2
LET dpnty(y)=-2.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 3 and x<3.9 and y>-2.2 and y<-.2 then
LET dpntx(x)=3.2
LET dpnty(y)=-.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
END IF
!Fourth Column
IF x> 4 and x<4.9 and y>-10.5 and y< -8.2 then
LET dpntx(x)=4.2
LET dpnty(y)=-8.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 4 and x<4.9 and y>-8.5 and y< -6.2 then
LET dpntx(x)=4.2
LET dpnty(y)=-6.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 4 and x<4.9 and y>-6.2 and y<-4.2 then
LET dpntx(x)=4.2
LET dpnty(y)=-4.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 4 and x<4.9 and y>-4.2 and y<-2.2 then
LET dpntx(x)=4.2
LET dpnty(y)=-2.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 4 and x<4.9 and y>-2.2 and y<-.2 then
LET dpntx(x)=4.2
LET dpnty(y)=-.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
END IF
!Fifth Column
IF x> 5 and x<5.9 and y>-10.5 and y< -8.2 then
LET dpntx(x)=5.2
LET dpnty(y)=-8.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 5 and x<5.9 and y>-8.5 and y< -6.2 then
LET dpntx(x)=5.2
LET dpnty(y)=-6.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 5 and x<5.9 and y>-6.2 and y<-4.2 then
LET dpntx(x)=5.2
LET dpnty(y)=-4.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 5 and x<5.9 and y>-4.2 and y<-2.2 then
LET dpntx(x)=5.2
LET dpnty(y)=-2.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 5 and x<5.9 and y>-2.2 and y<-.2 then
LET dpntx(x)=5.2
LET dpnty(y)=-.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
END IF
!Sixth Column
IF x> 6 and x<6.9 and y>-10.5 and y< -8.2 then
LET dpntx(x)=6.2
LET dpnty(y)=-8.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 6 and x<6.9 and y>-8.5 and y< -6.2 then
LET dpntx(x)=6.2
LET dpnty(y)=-6.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 6 and x<6.9 and y>-6.2 and y<-4.2 then
LET dpntx(x)=6.2
LET dpnty(y)=-4.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 6 and x<6.9 and y>-4.2 and y<-2.2 then
LET dpntx(x)=6.2
LET dpnty(y)=-2.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 6 and x<6.9 and y>-2.2 and y<-.2 then
LET dpntx(x)=6.2
LET dpnty(y)=-.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
END IF
!Seventh Column
IF x> 7 and x<7.9 and y>-10.5 and y< -8.2 then
LET dpntx(x)=7.2
LET dpnty(y)=-8.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 7 and x<7.9 and y>-8.5 and y< -6.2 then
LET dpntx(x)=7.2
LET dpnty(y)=-6.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 7 and x<7.9 and y>-6.2 and y<-4.2 then
LET dpntx(x)=7.2
LET dpnty(y)=-4.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 7 and x<7.9 and y>-4.2 and y<-2.2 then
LET dpntx(x)=7.2
LET dpnty(y)=-2.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 7 and x<7.9 and y>-2.2 and y<-.2 then
LET dpntx(x)=7.2
LET dpnty(y)=-.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
END IF
!Eigth Column
IF x> 8 and x<8.9 and y>-10.5 and y< -8.2 then
LET dpntx(x)=8.2
LET dpnty(y)=-8.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 8 and x<8.9 and y>-8.5 and y< -6.2 then
LET dpntx(x)=8.2
LET dpnty(y)=-6.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 8 and x<8.9 and y>-6.2 and y<-4.2 then
LET dpntx(x)=8.2
LET dpnty(y)=-4.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 8 and x<8.9 and y>-4.2 and y<-2.2 then
LET dpntx(x)=8.2
LET dpnty(y)=-2.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 8 and x<8.9 and y>-2.2 and y<-.2 then
LET dpntx(x)=8.2
LET dpnty(y)=-.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
END IF
!Ninth Column
IF x> 9 and x<9.9 and y>-10.5 and y< -8.2 then
LET dpntx(x)=9.2
LET dpnty(y)=-8.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 9 and x<9.9 and y>-8.5 and y< -6.2 then
LET dpntx(x)=9.2
LET dpnty(y)=-6.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 9 and x<9.9 and y>-6.2 and y<-4.2 then
LET dpntx(x)=9.2
LET dpnty(y)=-4.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 9 and x<9.9 and y>-4.2 and y<-2.2 then
LET dpntx(x)=9.2
LET dpnty(y)=-2.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 9 and x<9.9 and y>-2.2 and y<-.2 then
LET dpntx(x)=9.2
LET dpnty(y)=-.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
END IF
!Tenth Column
IF x>10 and x<10.9 and y>-8.5 and y< -6.2 then
LET dpntx(x)=10.2
LET dpnty(y)=-6.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 10 and x<10.9 and y>-6.2 and y<-4.2 then
LET dpntx(x)=10.2
LET dpnty(y)=-4.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 10 and x<10.9 and y>-4.2 and y<-2.2 then
LET dpntx(x)=10.2
LET dpnty(y)=-2.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
ELSEIF x> 10 and x<10.9 and y>-2.2 and y<-.2 then
LET dpntx(x)=10.2
LET dpnty(y)=-.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpntx(x), dpnty(y))
END IF
END SELECT
ELSEIF a=49 then
GET MOUSE x,y,s
SELECT CASE s
CASE 0
CASE 2
CASE 3
!First column
IF x>1 and x<1.9 and y > -8.5 and y <-6.4 then
LET apntx(x)=1.2
LET apnty(y)=-6.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 1 and x<1.9 and y> -6.5 and y<-4.4 then
LET apntx(x)=1.2
LET apnty(y)=-4.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x>1 and x<1.9 and y>-4.5 and y< -2.4 then
LET apntx(x)=1.2
LET apnty(y)=-2.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
END IF
!Second Column
IF x> 2 and x<2.9 and y>-10.2 and y<-8.2 then
LET apntx(x)=2.2
LET apnty(y)=-8.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 2 and x<2.9 and y>-6.2 and y<-4.2 then
LET apntx(x)=2.2
LET apnty(y)=-4.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 2 and x<2.9 and y>-8.5 and y< -6.2 then
LET apntx(x)=2.2
LET apnty(y)=-6.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 2 and x<2.9 and y>-4.2 and y<-2.2 then
LET apntx(x)=2.2
LET apnty(y)=-2.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 2 and x<2.9 and y>-2.2 and y<-.2 then
LET apntx(x)=2.2
LET apnty(y)=-.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
END IF
!Third Column
IF x> 3 and x<3.9 and y>-10.5 and y< -8.2 then
LET apntx(x)=3.2
LET apnty(y)=-8.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 3 and x<3.9 and y>-8.5 and y< -6.2 then
LET apntx(x)=3.2
LET apnty(y)=-6.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 3 and x<3.9 and y>-6.2 and y<-4.2 then
LET apntx(x)=3.2
LET apnty(y)=-4.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 3 and x<3.9 and y>-4.2 and y<-2.2 then
LET apntx(x)=3.2
LET apnty(y)=-2.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 3 and x<3.9 and y>-2.2 and y<-.2 then
LET apntx(x)=3.2
LET apnty(y)=-.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
END IF
!Fourth Column
IF x> 4 and x<4.9 and y>-10.5 and y< -8.2 then
LET apntx(x)=4.2
LET apnty(y)=-8.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 4 and x<4.9 and y>-8.5 and y< -6.2 then
LET apntx(x)=4.2
LET apnty(y)=-6.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 4 and x<4.9 and y>-6.2 and y<-4.2 then
LET apntx(x)=4.2
LET apnty(y)=-4.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 4 and x<4.9 and y>-4.2 and y<-2.2 then
LET apntx(x)=4.2
LET apnty(y)=-2.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 4 and x<4.9 and y>-2.2 and y<-.2 then
LET apntx(x)=4.2
LET apnty(y)=-.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
END IF
!Fifth Column
IF x> 5 and x<5.9 and y>-10.5 and y< -8.2 then
LET apntx(x)=5.2
LET apnty(y)=-8.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 5 and x<5.9 and y>-8.5 and y< -6.2 then
LET apntx(x)=5.2
LET apnty(y)=-6.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 5 and x<5.9 and y>-6.2 and y<-4.2 then
LET apntx(x)=5.2
LET apnty(y)=-4.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 5 and x<5.9 and y>-4.2 and y<-2.2 then
LET apntx(x)=5.2
LET apnty(y)=-2.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 5 and x<5.9 and y>-2.2 and y<-.2 then
LET apntx(x)=5.2
LET apnty(y)=-.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
END IF
!Sixth Column
IF x> 6 and x<6.9 and y>-10.5 and y< -8.2 then
LET apntx(x)=6.2
LET apnty(y)=-8.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 6 and x<6.9 and y>-8.5 and y< -6.2 then
LET apntx(x)=6.2
LET apnty(y)=-6.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 6 and x<6.9 and y>-6.2 and y<-4.2 then
LET apntx(x)=6.2
LET apnty(y)=-4.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 6 and x<6.9 and y>-4.2 and y<-2.2 then
LET apntx(x)=6.2
LET apnty(y)=-2.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 6 and x<6.9 and y>-2.2 and y<-.2 then
LET apntx(x)=6.2
LET apnty(y)=-.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
END IF
!Seventh Column
IF x> 7 and x<7.9 and y>-10.5 and y< -8.2 then
LET apntx(x)=7.2
LET apnty(y)=-8.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 7 and x<7.9 and y>-8.5 and y< -6.2 then
LET apntx(x)=7.2
LET apnty(y)=-6.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 7 and x<7.9 and y>-6.2 and y<-4.2 then
LET apntx(x)=7.2
LET apnty(y)=-4.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 7 and x<7.9 and y>-4.2 and y<-2.2 then
LET apntx(x)=7.2
LET apnty(y)=-2.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 7 and x<7.9 and y>-2.2 and y<-.2 then
LET apntx(x)=7.2
LET apnty(y)=-.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
END IF
!Eigth Column
IF x> 8 and x<8.9 and y>-10.5 and y< -8.2 then
LET apntx(x)=8.2
LET apnty(y)=-8.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 8 and x<8.9 and y>-8.5 and y< -6.2 then
LET apntx(x)=8.2
LET apnty(y)=-6.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 8 and x<8.9 and y>-6.2 and y<-4.2 then
LET apntx(x)=8.2
LET apnty(y)=-4.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 8 and x<8.9 and y>-4.2 and y<-2.2 then
LET apntx(x)=8.2
LET apnty(y)=-2.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 8 and x<8.9 and y>-2.2 and y<-.2 then
LET apntx(x)=8.2
LET apnty(y)=-.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
END IF
!Ninth Column
IF x> 9 and x<9.9 and y>-10.5 and y< -8.2 then
LET apntx(x)=9.2
LET apnty(y)=-8.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 9 and x<9.9 and y>-8.5 and y< -6.2 then
LET apntx(x)=9.2
LET apnty(y)=-6.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 9 and x<9.9 and y>-6.2 and y<-4.2 then
LET apntx(x)=9.2
LET apnty(y)=-4.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 9 and x<9.9 and y>-4.2 and y<-2.2 then
LET apntx(x)=9.2
LET apnty(y)=-2.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 9 and x<9.9 and y>-2.2 and y<-.2 then
LET apntx(x)=9.2
LET apnty(y)=-.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
END IF
!Tenth Column
IF x>10 and x<10.9 and y>-8.5 and y< -6.2 then
LET apntx(x)=10.2
LET apnty(y)=-6.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 10 and x<10.9 and y>-6.2 and y<-4.2 then
LET apntx(x)=10.2
LET apnty(y)=-4.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 10 and x<10.9 and y>-4.2 and y<-2.2 then
LET apntx(x)=10.2
LET apnty(y)=-2.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
ELSEIF x> 10 and x<10.9 and y>-2.2 and y<-.2 then
LET apntx(x)=10.2
LET apnty(y)=-.2
CALL g_create (OffensePiece1, "Offense Piece 1.BMP", apntx(x), apnty(y))
END IF
END SELECT
END IF
GET KEY a
END SUB
SUB P2Turn
PLOT TEXT, AT 1.2,-10: "Player 2 Turn"
GET KEY a
IF a=50 then
GET MOUSE x,y,s
SELECT CASE s
CASE 0
CASE 2
CASE 3
!First column
IF x>1 and x<1.9 and y > -8.5 and y <-6.4 then
LET dpntx(x)=1.2
LET dpnt2y(y)=-6.2
CALL g_create (DefensePiece1, "Defense Piece 1.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x>1 and x<1.9 and y> -6.5 and y<-4.4 then
LET dpnt2x(dplace2)=1.2
LET dpnt2y(y)=-4.2
CALL g_create(DefensePiece1, "Defense Piece 1.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x>1 and x<1.9 and y>-4.5 and y< -2.4 then
LET dpnt2x(dplace2)=1.2
LET dpnt2y(y)=-2.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
END IF
!Second Column
IF x> 2 and x<2.9 and y>-10.2 and y<-8.2 then
LET dpnt2x(dplace2)=2.2
LET dpnt2y(y)=-8.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 2 and x<2.9 and y>-6.2 and y<-4.2 then
LET dpnt2x(dplace2)=2.2
LET dpnt2y(y)=-4.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 2 and x<2.9 and y>-8.5 and y< -6.2 then
LET dpnt2x(dplace2)=2.2
LET dpnt2y(y)=-6.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 2 and x<2.9 and y>-4.2 and y<-2.2 then
LET dpnt2x(dplace2)=2.2
LET dpnt2y(y)=-2.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 2 and x<2.9 and y>-2.2 and y<-.2 then
LET dpnt2x(dplace2)=2.2
LET dpnt2y(y)=-.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
END IF
!Third Column
IF x> 3 and x<3.9 and y>-10.5 and y< -8.2 then
LET dpnt2x(dplace2)=3.2
LET dpnt2y(y)=-8.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 3 and x<3.9 and y>-8.5 and y< -6.2 then
LET dpnt2x(dplace2)=3.2
LET dpnt2y(y)=-6.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 3 and x<3.9 and y>-6.2 and y<-4.2 then
LET dpnt2x(dplace2)=3.2
LET dpnt2y(y)=-4.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 3 and x<3.9 and y>-4.2 and y<-2.2 then
LET dpnt2x(dplace2)=3.2
LET dpnt2y(y)=-2.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 3 and x<3.9 and y>-2.2 and y<-.2 then
LET dpnt2x(dplace2)=3.2
LET dpnt2y(y)=-.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
END IF
!Fourth Column
IF x> 4 and x<4.9 and y>-10.5 and y< -8.2 then
LET dpnt2x(dplace2)=4.2
LET dpnt2y(y)=-8.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 4 and x<4.9 and y>-8.5 and y< -6.2 then
LET dpnt2x(dplace2)=4.2
LET dpnt2y(y)=-6.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 4 and x<4.9 and y>-6.2 and y<-4.2 then
LET dpnt2x(dplace2)=4.2
LET dpnt2y(y)=-4.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 4 and x<4.9 and y>-4.2 and y<-2.2 then
LET dpnt2x(dplace2)=4.2
LET dpnt2y(y)=-2.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 4 and x<4.9 and y>-2.2 and y<-.2 then
LET dpnt2x(dplace2)=4.2
LET dpnt2y(y)=-.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
END IF
!Fifth Column
IF x> 5 and x<5.9 and y>-10.5 and y< -8.2 then
LET dpnt2x(dplace2)=5.2
LET dpnt2y(y)=-8.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 5 and x<5.9 and y>-8.5 and y< -6.2 then
LET dpnt2x(dplace2)=5.2
LET dpnt2y(y)=-6.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 5 and x<5.9 and y>-6.2 and y<-4.2 then
LET dpnt2x(dplace2)=5.2
LET dpnt2y(y)=-4.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 5 and x<5.9 and y>-4.2 and y<-2.2 then
LET dpnt2x(dplace2)=5.2
LET dpnt2y(y)=-2.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 5 and x<5.9 and y>-2.2 and y<-.2 then
LET dpnt2x(dplace2)=5.2
LET dpnt2y(y)=-.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
END IF
!Sixth Column
IF x> 6 and x<6.9 and y>-10.5 and y< -8.2 then
LET dpnt2x(dplace2)=6.2
LET dpnt2y(y)=-8.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 6 and x<6.9 and y>-8.5 and y< -6.2 then
LET dpnt2x(dplace2)=6.2
LET dpnt2y(y)=-6.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 6 and x<6.9 and y>-6.2 and y<-4.2 then
LET dpnt2x(dplace2)=6.2
LET dpnt2y(y)=-4.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 6 and x<6.9 and y>-4.2 and y<-2.2 then
LET dpnt2x(dplace2)=6.2
LET dpnt2y(y)=-2.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 6 and x<6.9 and y>-2.2 and y<-.2 then
LET dpnt2x(dplace2)=6.2
LET dpnt2y(y)=-.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
END IF
!Seventh Column
IF x> 7 and x<7.9 and y>-10.5 and y< -8.2 then
LET dpnt2x(dplace2)=7.2
LET dpnt2y(y)=-8.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 7 and x<7.9 and y>-8.5 and y< -6.2 then
LET dpnt2x(dplace2)=7.2
LET dpnt2y(y)=-6.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 7 and x<7.9 and y>-6.2 and y<-4.2 then
LET dpnt2x(dplace2)=7.2
LET dpnt2y(y)=-4.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 7 and x<7.9 and y>-4.2 and y<-2.2 then
LET dpnt2x(dplace2)=7.2
LET dpnt2y(y)=-2.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 7 and x<7.9 and y>-2.2 and y<-.2 then
LET dpnt2x(dplace2)=7.2
LET dpnt2y(y)=-.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
END IF
!Eigth Column
IF x> 8 and x<8.9 and y>-10.5 and y< -8.2 then
LET dpnt2x(dplace2)=8.2
LET dpnt2y(y)=-8.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 8 and x<8.9 and y>-8.5 and y< -6.2 then
LET dpnt2x(dplace2)=8.2
LET dpnt2y(y)=-6.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 8 and x<8.9 and y>-6.2 and y<-4.2 then
LET dpnt2x(dplace2)=8.2
LET dpnt2y(y)=-4.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 8 and x<8.9 and y>-4.2 and y<-2.2 then
LET dpnt2x(dplace2)=8.2
LET dpnt2y(y)=-2.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 8 and x<8.9 and y>-2.2 and y<-.2 then
LET dpnt2x(dplace2)=8.2
LET dpnt2y(y)=-.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
END IF
!Ninth Column
IF x> 9 and x<9.9 and y>-10.5 and y< -8.2 then
LET dpnt2x(dplace2)=9.2
LET dpnt2y(y)=-8.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 9 and x<9.9 and y>-8.5 and y< -6.2 then
LET dpnt2x(dplace2)=9.2
LET dpnt2y(y)=-6.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 9 and x<9.9 and y>-6.2 and y<-4.2 then
LET dpnt2x(dplace2)=9.2
LET dpnt2y(y)=-4.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 9 and x<9.9 and y>-4.2 and y<-2.2 then
LET dpnt2x(dplace2)=9.2
LET dpnt2y(y)=-2.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 9 and x<9.9 and y>-2.2 and y<-.2 then
LET dpnt2x(dplace2)=9.2
LET dpnt2y(y)=-.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
END IF
!Tenth Column
IF x>10 and x<10.9 and y>-8.5 and y< -6.2 then
LET dpnt2x(dplace2)=10.2
LET dpnt2y(y)=-6.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 10 and x<10.9 and y>-6.2 and y<-4.2 then
LET dpnt2x(dplace2)=10.2
LET dpnt2y(y)=-4.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 10 and x<10.9 and y>-4.2 and y<-2.2 then
LET dpnt2x(dplace2)=10.2
LET dpnt2y(y)=-2.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
ELSEIF x> 10 and x<10.9 and y>-2.2 and y<-.2 then
LET dpnt2x(dplace2)=10.2
LET dpnt2y(y)=-.2
CALL g_create (DefensePiece2, "Defense Piece 2.BMP", dpnt2x(dplace2), dpnt2y(y))
END IF
END SELECT
ELSEIF a=49 then
GET MOUSE x,y,s
SELECT CASE s
CASE 0
CASE 2
CASE 3
!First column
IF x>1 and x<1.9 and y > -8.5 and y <-6.4 then
LET apnt2x(x)=1.2
LET apnt2y(y)=-6.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 1 and x<1.9 and y> -6.5 and y<-4.4 then
LET apnt2x(x)=1.2
LET apnt2y(y)=-4.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x>1 and x<1.9 and y>-4.5 and y< -2.4 then
LET apnt2x(x)=1.2
LET apnt2y(y)=-2.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
END IF
!Second Column
IF x> 2 and x<2.9 and y>-10.2 and y<-8.2 then
LET apnt2x(x)=2.2
LET apnt2y(y)=-8.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 2 and x<2.9 and y>-6.2 and y<-4.2 then
LET apnt2x(x)=2.2
LET apnt2y(y)=-4.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 2 and x<2.9 and y>-8.5 and y< -6.2 then
LET apnt2x(x)=2.2
LET apnt2y(y)=-6.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 2 and x<2.9 and y>-4.2 and y<-2.2 then
LET apnt2x(x)=2.2
LET apnt2y(y)=-2.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 2 and x<2.9 and y>-2.2 and y<-.2 then
LET apnt2x(x)=2.2
LET apnt2y(y)=-.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
END IF
!Third Column
IF x> 3 and x<3.9 and y>-10.5 and y< -8.2 then
LET apnt2x(x)=3.2
LET apnt2y(y)=-8.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 3 and x<3.9 and y>-8.5 and y< -6.2 then
LET apnt2x(x)=3.2
LET apnt2y(y)=-6.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 3 and x<3.9 and y>-6.2 and y<-4.2 then
LET apnt2x(x)=3.2
LET apnt2y(y)=-4.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 3 and x<3.9 and y>-4.2 and y<-2.2 then
LET apnt2x(x)=3.2
LET apnt2y(y)=-2.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 3 and x<3.9 and y>-2.2 and y<-.2 then
LET apnt2x(x)=3.2
LET apnt2y(y)=-.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
END IF
!Fourth Column
IF x> 4 and x<4.9 and y>-10.5 and y< -8.2 then
LET apnt2x(x)=4.2
LET apnt2y(y)=-8.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 4 and x<4.9 and y>-8.5 and y< -6.2 then
LET apnt2x(x)=4.2
LET apnt2y(y)=-6.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 4 and x<4.9 and y>-6.2 and y<-4.2 then
LET apnt2x(x)=4.2
LET apnt2y(y)=-4.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 4 and x<4.9 and y>-4.2 and y<-2.2 then
LET apnt2x(x)=4.2
LET apnt2y(y)=-2.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 4 and x<4.9 and y>-2.2 and y<-.2 then
LET apnt2x(x)=4.2
LET apnt2y(y)=-.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
END IF
!Fifth Column
IF x> 5 and x<5.9 and y>-10.5 and y< -8.2 then
LET apnt2x(x)=5.2
LET apnt2y(y)=-8.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 5 and x<5.9 and y>-8.5 and y< -6.2 then
LET apnt2x(x)=5.2
LET apnt2y(y)=-6.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 5 and x<5.9 and y>-6.2 and y<-4.2 then
LET apnt2x(x)=5.2
LET apnt2y(y)=-4.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 5 and x<5.9 and y>-4.2 and y<-2.2 then
LET apnt2x(x)=5.2
LET apnt2y(y)=-2.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 5 and x<5.9 and y>-2.2 and y<-.2 then
LET apnt2x(x)=5.2
LET apnt2y(y)=-.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
END IF
!Sixth Column
IF x> 6 and x<6.9 and y>-10.5 and y< -8.2 then
LET apnt2x(x)=6.2
LET apnt2y(y)=-8.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 6 and x<6.9 and y>-8.5 and y< -6.2 then
LET apnt2x(x)=6.2
LET apnt2y(y)=-6.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 6 and x<6.9 and y>-6.2 and y<-4.2 then
LET apnt2x(x)=6.2
LET apnt2y(y)=-4.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 6 and x<6.9 and y>-4.2 and y<-2.2 then
LET apnt2x(x)=6.2
LET apnt2y(y)=-2.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 6 and x<6.9 and y>-2.2 and y<-.2 then
LET apnt2x(x)=6.2
LET apnt2y(y)=-.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
END IF
!Seventh Column
IF x> 7 and x<7.9 and y>-10.5 and y< -8.2 then
LET apnt2x(x)=7.2
LET apnt2y(y)=-8.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 7 and x<7.9 and y>-8.5 and y< -6.2 then
LET apnt2x(x)=7.2
LET apnt2y(y)=-6.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 7 and x<7.9 and y>-6.2 and y<-4.2 then
LET apnt2x(x)=7.2
LET apnt2y(y)=-4.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 7 and x<7.9 and y>-4.2 and y<-2.2 then
LET apnt2x(x)=7.2
LET apnt2y(y)=-2.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 7 and x<7.9 and y>-2.2 and y<-.2 then
LET apnt2x(x)=7.2
LET apnt2y(y)=-.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
END IF
!Eigth Column
IF x> 8 and x<8.9 and y>-10.5 and y< -8.2 then
LET apnt2x(x)=8.2
LET apnt2y(y)=-8.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 8 and x<8.9 and y>-8.5 and y< -6.2 then
LET apnt2x(x)=8.2
LET apnt2y(y)=-6.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 8 and x<8.9 and y>-6.2 and y<-4.2 then
LET apnt2x(x)=8.2
LET apnt2y(y)=-4.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 8 and x<8.9 and y>-4.2 and y<-2.2 then
LET apnt2x(x)=8.2
LET apnt2y(y)=-2.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 8 and x<8.9 and y>-2.2 and y<-.2 then
LET apnt2x(x)=8.2
LET apnt2y(y)=-.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
END IF
!Ninth Column
IF x> 9 and x<9.9 and y>-10.5 and y< -8.2 then
LET apnt2x(x)=9.2
LET apnt2y(y)=-8.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 9 and x<9.9 and y>-8.5 and y< -6.2 then
LET apnt2x(x)=9.2
LET apnt2y(y)=-6.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 9 and x<9.9 and y>-6.2 and y<-4.2 then
LET apnt2x(x)=9.2
LET apnt2y(y)=-4.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 9 and x<9.9 and y>-4.2 and y<-2.2 then
LET apnt2x(x)=9.2
LET apnt2y(y)=-2.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 9 and x<9.9 and y>-2.2 and y<-.2 then
LET apnt2x(x)=9.2
LET apnt2y(y)=-.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
END IF
!Tenth Column
IF x>10 and x<10.9 and y>-8.5 and y< -6.2 then
LET apnt2x(x)=10.2
LET apnt2y(y)=-6.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 10 and x<10.9 and y>-6.2 and y<-4.2 then
LET apnt2x(x)=10.2
LET apnt2y(y)=-4.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 10 and x<10.9 and y>-4.2 and y<-2.2 then
LET apnt2x(x)=10.2
LET apnt2y(y)=-2.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
ELSEIF x> 10 and x<10.9 and y>-2.2 and y<-.2 then
LET apnt2x(x)=10.2
LET apnt2y(y)=-.2
CALL g_create (OffensePiece2, "Offense Piece 2.BMP", apnt2x(x), apnt2y(y))
END IF
END SELECT
END IF
GET KEY a
END SUB
SUB Base1P1
CALL g_create (Base1P1, "BaseP1.BMP", 1.3, -8.5)
END SUB
SUB Base4P2
CALL g_create (Base4P2, "BaseP2.BMP", 10.3, -.5)
END SUB
CALL turn1
DO
CALL P2Turn
CALL P1Turn
LOOP
END Reason i need the DIM statements is so that I can make it so that when I need one piece to take another or claim a base then the piece data is stored away.