S22Saenke-Slagskibe_Main/battleship_game_board/battleship_game_board.pde
int a1;
int a2;
int a3;
int a4;
int a5;
int a6;
int a7;
int a8;
int a9;
int a10;

int b1;
int b2;
int b3;
int b4;
int b5;
int b6;
int b7;
int b8;
int b9;
int b10;

int c1;
int c2;
int c3;
int c4;
int c5;
int c6;
int c7;
int c8;
int c9;
int c10;

int d1;
int d2;
int d3;
int d4;
int d5;
int d6;
int d7;
int d8;
int d9;
int d10;

int e1;
int e2;
int e3;
int e4;
int e5;
int e6;
int e7;
int e8;
int e9;
int e10;

int f1;
int f2;
int f3;
int f4;
int f5;
int f6;
int f7;
int f8;
int f9;
int f10;

int g1;
int g2;
int g3;
int g4;
int g5;
int g6;
int g7;
int g8;
int g9;
int g10;

int h1;
int h2;
int h3;
int h4;
int h5;
int h6;
int h7;
int h8;
int h9;
int h10;

int i1;
int i2;
int i3;
int i4;
int i5;
int i6;
int i7;
int i8;
int i9;
int i10;

int j1;
int j2;
int j3;
int j4;
int j5;
int j6;
int j7;
int j8;
int j9;
int j10;

int win;
int[][] eboardm = new int[10][10];
int[][] boardm = new int[10][10];
int[][] boardm1 = new int[10][10];

PImage splash;
PImage fire; /* her og i void setup definerer jeg en variabel "fire" som loader en image kun en gang i stedet
 for at gøre det i void draw for hver gang man trykker på en af clickboxes...jeg fand ud af at på den måde undgår man
 lags som opståede da jeg havde skrevet : ,,PImage fire=loadImage(fire.png),, hver han foran resize ind i void draw... (kig på linje 656,662,668 */
 PImage victoryss;
PImage defeatss;

void setup() {
  boardm = fuc();
  eboardm = efuc();
  

  fire=loadImage("fire.png");
     splash=loadImage("splash.png");
     victoryss=loadImage("victoryss.png");
   defeatss=loadImage("defeatss.png");

  background(/*220, 240, 100*/255);
  fullScreen();
  //fullScreen();
  stroke(0);
  strokeWeight(2);
  //creative game title design :
  PImage fire= loadImage("fire.png");
  /* PImage ocean_background=loadImage("ocean_background.png");
   image(ocean_background,0,0);*/  // nie dobrze to wyglada
  tint(255, 127);// 127-50% opacity
  PImage ocean2= loadImage("ocean2.png");
  ocean2.resize(1700, 0);
  image(ocean2, 100, 230);
  tint(255, 255);//255-back to 100% opacity
  PImage goodwave= loadImage("good_wave.png");
  goodwave.resize(1000, 0);
  image(goodwave, 650, -30);
  tint(255, 127);// 127-50% opacity
  PImage ocean1= loadImage("ocean1.png");
  ocean1.resize(1700, 0);
  image(ocean1, 1050, 230);
  tint(255, 255);//255-back to 100% opacity
  fill(0);
  textSize(100);
  text("Battle Shi    s", width/2.8, 100);
  PImage pirat_ship= loadImage("pirat_ship.png");
  pirat_ship.resize(202, 0);
  image(pirat_ship, 1030, 10);
  PImage wave= loadImage("wave.png");
  wave.resize(500, 0);
  image(wave, 1000, 50);
  
a1= eboardm[0][0];
a2= eboardm[1][0];
a3= eboardm[2][0];
a4= eboardm[3][0];
a5= eboardm[4][0];
a6= eboardm[5][0];
a7= eboardm[6][0];
a8= eboardm[7][0];
a9= eboardm[8][0];
a10= eboardm[9][0];

b1= eboardm[0][1];
b2= eboardm[1][1];
b3= eboardm[2][1];
b4= eboardm[3][1];
b5= eboardm[4][1];
b6= eboardm[5][1];
b7= eboardm[6][1];
b8= eboardm[7][1];
b9= eboardm[8][1];
b10= eboardm[9][1];

c1= eboardm[0][2];
c2= eboardm[1][2];
c3= eboardm[2][2];
c4= eboardm[3][2];
c5= eboardm[4][2];
c6= eboardm[5][2];
c7= eboardm[6][2];
c8= eboardm[7][2];
c9= eboardm[8][2];
c10= eboardm[9][2];

d1= eboardm[0][3];
d2= eboardm[1][3];
d3= eboardm[2][3];
d4= eboardm[3][3];
d5= eboardm[4][3];
d6= eboardm[5][3];
d7= eboardm[6][3];
d8= eboardm[7][3];
d9= eboardm[8][3];
d10= eboardm[9][3];

e1= eboardm[0][4];
e2= eboardm[1][4];
e3= eboardm[2][4];
e4= eboardm[3][4];
e5= eboardm[4][4];
e6= eboardm[5][4];
e7= eboardm[6][4];
e8= eboardm[7][4];
e9= eboardm[8][4];
e10= eboardm[9][4];

f1= eboardm[0][5];
f2= eboardm[1][5];
f3= eboardm[2][5];
f4= eboardm[3][5];
f5= eboardm[4][5];
f6= eboardm[5][5];
f7= eboardm[6][5];
f8= eboardm[7][5];
f9= eboardm[8][5];
f10= eboardm[9][5];

g1= eboardm[0][6];
g2= eboardm[1][6];
g3= eboardm[2][6];
g4= eboardm[3][6];
g5= eboardm[4][6];
g6= eboardm[5][6];
g7= eboardm[6][6];
g8= eboardm[7][6];
g9= eboardm[8][6];
g10= eboardm[9][6];

h1= eboardm[0][7];
h2= eboardm[1][7];
h3= eboardm[2][7];
h4= eboardm[3][7];
h5= eboardm[4][7];
h6= eboardm[5][7];
h7= eboardm[6][7];
h8= eboardm[7][7];
h9= eboardm[8][7];
h10= eboardm[9][7];

i1= eboardm[0][8];
i2= eboardm[1][8];
i3= eboardm[2][8];
i4= eboardm[3][8];
i5= eboardm[4][8];
i6= eboardm[5][8];
i7= eboardm[6][8];
i8= eboardm[7][8];
i9= eboardm[8][8];
i10= eboardm[9][8];

j1= eboardm[0][9];
j2= eboardm[1][9];
j3= eboardm[2][9];
j4= eboardm[3][9];
j5= eboardm[4][9];
j6= eboardm[5][9];
j7= eboardm[6][9];
j8= eboardm[7][9];
j9= eboardm[8][9];
j10= eboardm[9][9];
}






void draw() {
  game_board();
  int[] ship1 = pship(0);
  int[] ship2 = pship(1);
  int[] ship3 = pship(2);
  int[] ship4 = pship(3);
  int[] ship5 = pship(4);
  ild();
  target_missed();
  if(win==1){
    image(victoryss,width/2-343,height/2-156);
  
  }
  if(win==2){
   image(defeatss,width/2-433,height/2-160);
  }
}


void game_board() {
  //                                                                      left gridsystem
  for (int i = 0; i < 751; i = i + 75) {
    line(100, 305, 175, 305);
    pushMatrix();
    translate(100, 230);
    line(0, i, 750, i);
    line(i, 0, i, 750);
    fill(0);
    popMatrix();
    //                                                                    right gridsystem
    pushMatrix();
    translate(1050, 230);
    line(0, i, 750, i);
    line(i, 0, i, 750);
    fill(0);
    popMatrix();

    //                                                                    leftside Numbers
    for (int k=1; k<10; k++) {
      textSize(50);
      text(k, 55, 205+k*75);
    }
    textSize(50);
    text("10", 42, 205+(75*10));
  }

  //                                                                      rightside numbers
  pushMatrix();
  translate(950, 0);
  for (int k=1; k<10; k++) {
    textSize(50);
    text(k, 55, 205+k*75);
  }
  textSize(50);
  text("10", 42, 205+(75*10));
  popMatrix();

  //                                                                      text on left side
  for (char k=1; k<10; k++) {
    textSize(50);
    text(char(k+64), 50+k*75, 225);
  }
  textSize(50);
  text("J", 50+10*75, 225);

  //                                                                      text on right side
  pushMatrix();
  translate(950, 0);
  for (char k=1; k<10; k++) {
    textSize(50);
    text(char(k+64), 50+k*75, 225);
  }
  textSize(50);
  text("J", 50+10*75, 225);
  popMatrix();
}




void mouseClicked() {
  float x=mouseX;
  float y=mouseY;
  /////////////////////////////////////////////////////     A  CLICK BOXES     ////////////////////////////////////////////////////////
  //a1
  if ((x>100&&x<100+(75*1))&&(y>230&&y<230+(75*1))) {
    a1=a1+2;
  }
  //a2
  if ((x>100&&x<100+(75*1))&&(y>230+(75*1)&&y<230+(75*2))) {
    a2=a2+2;
  }
  //a3
  if ((x>100&&x<100+(75*1))&&(y>230+(75*2)&&y<230+(75*3))) {
    a3=a3+2;
  }
  //a4
  if ((x>100&&x<100+(75*1))&&(y>230+(75*3)&&y<230+(75*4))) {
    a4=a4+2;
  }
  //a5
  if ((x>100&&x<100+(75*1))&&(y>230+(75*4)&&y<230+(75*5))) {
    a5=a5+2;
  }
  //a6
  if ((x>100&&x<100+(75*1))&&(y>230+(75*5)&&y<230+(75*6))) {
    a6=a6+2;
  }
  //a7
  if ((x>100&&x<100+(75*1))&&(y>230+(75*6)&&y<230+(75*7))) {
    a7=a7+2;
  }
  //a8
  if ((x>100&&x<100+(75*1))&&(y>230+(75*7)&&y<230+(75*8))) {
    a8=a8+2;
  }
  //a9
  if ((x>100&&x<100+(75*1))&&(y>230+(75*8)&&y<230+(75*9))) {
    a9=a9+2;
  }
  //a10
  if ((x>100&&x<100+(75*1))&&(y>230+(75*9)&&y<230+(75*10))) {
    a10=a10+2;
  }
  /////////////////////////////////////////////////////     B  CLICK BOXES     ////////////////////////////////////////////////////////
  //b1
  if ((x>100+(75*1)&&x<100+(75*2))&&(y>230&&y<230+(75*1))) {
    b1=b1+2;
  }
  //b2
  if ((x>100+(75*1)&&x<100+(75*2))&&(y>230+(75*1)&&y<230+(75*2))) {
    b2=b2+2;
  }
  //b3
  if ((x>100+(75*1)&&x<100+(75*2))&&(y>230+(75*2)&&y<230+(75*3))) {
    b3=b3+2;
  }
  //b4
  if ((x>100+(75*1)&&x<100+(75*2))&&(y>230+(75*3)&&y<230+(75*4))) {
    b4=b4+2;
  }
  //b5
  if ((x>100+(75*1)&&x<100+(75*2))&&(y>230+(75*4)&&y<230+(75*5))) {
    b5=b5+2;
  }
  //b6
  if ((x>100+(75*1)&&x<100+(75*2))&&(y>230+(75*5)&&y<230+(75*6))) {
    b6=b6+2;
  }
  //b7
  if ((x>100+(75*1)&&x<100+(75*2))&&(y>230+(75*6)&&y<230+(75*7))) {
    b7=b7+2;
  }
  //b8
  if ((x>100+(75*1)&&x<100+(75*2))&&(y>230+(75*7)&&y<230+(75*8))) {
    b8=b8+2;
  }
  //b9
  if ((x>100+(75*1)&&x<100+(75*2))&&(y>230+(75*8)&&y<230+(75*9))) {
    b9=b9+2;
  }
  //b10
  if ((x>100+(75*1)&&x<100+(75*2))&&(y>230+(75*9)&&y<230+(75*10))) {
    b10=b10+2;
  }
  /////////////////////////////////////////////////////     C   CLICK BOXES     ////////////////////////////////////////////////////////
  //c1
  if ((x>100+(75*2)&&x<100+(75*3))&&(y>230&&y<230+(75*1))) {
    c1=c1+2;
  }
  //c2
  if ((x>100+(75*2)&&x<100+(75*3))&&(y>230+(75*1)&&y<230+(75*2))) {
    c2=c2+2;
  }
  //c3
  if ((x>100+(75*2)&&x<100+(75*3))&&(y>230+(75*2)&&y<230+(75*3))) {
    c3=c3+2;
  }
  //c4
  if ((x>100+(75*2)&&x<100+(75*3))&&(y>230+(75*3)&&y<230+(75*4))) {
    c4=c4+2;
  }
  //c5
  if ((x>100+(75*2)&&x<100+(75*3))&&(y>230+(75*4)&&y<230+(75*5))) {
    c5=c5+2;
  }
  //c6
  if ((x>100+(75*2)&&x<100+(75*3))&&(y>230+(75*5)&&y<230+(75*6))) {
    c6=c6+2;
  }
  //c7
  if ((x>100+(75*2)&&x<100+(75*3))&&(y>230+(75*6)&&y<230+(75*7))) {
    c7=c7+2;
  }
  //c8
  if ((x>100+(75*2)&&x<100+(75*3))&&(y>230+(75*7)&&y<230+(75*8))) {
    c8=c8+2;
  }
  //c9
  if ((x>100+(75*2)&&x<100+(75*3))&&(y>230+(75*8)&&y<230+(75*9))) {
    c9=c9+2;
  }
  //c10
  if ((x>100+(75*2)&&x<100+(75*3))&&(y>230+(75*9)&&y<230+(75*10))) {
    c10=c10+2;
  }
  /////////////////////////////////////////////////////     D  CLICK BOXES     ////////////////////////////////////////////////////////
  //d1
  if ((x>100+(75*3)&&x<100+(75*4))&&(y>230&&y<230+(75*1))) {
    d1=d1+2;
  }
  //d2
  if ((x>100+(75*3)&&x<100+(75*4))&&(y>230+(75*1)&&y<230+(75*2))) {
    d2=d2+2;
  }
  //d3
  if ((x>100+(75*3)&&x<100+(75*4))&&(y>230+(75*2)&&y<230+(75*3))) {
    d3=d3+2;
  }
  //d4
  if ((x>100+(75*3)&&x<100+(75*4))&&(y>230+(75*3)&&y<230+(75*4))) {
    d4=d4+2;
  }
  //d5
  if ((x>100+(75*3)&&x<100+(75*4))&&(y>230+(75*4)&&y<230+(75*5))) {
    d5=d5+2;
  }
  //d6
  if ((x>100+(75*3)&&x<100+(75*4))&&(y>230+(75*5)&&y<230+(75*6))) {
    d6=d6+2;
  }
  //d7
  if ((x>100+(75*3)&&x<100+(75*4))&&(y>230+(75*6)&&y<230+(75*7))) {
    d7=d7+2;
  }
  //d8
  if ((x>100+(75*3)&&x<100+(75*4))&&(y>230+(75*7)&&y<230+(75*8))) {
    d8=d8+2;
  }
  //d9
  if ((x>100+(75*3)&&x<100+(75*4))&&(y>230+(75*8)&&y<230+(75*9))) {
    d9=d9+2;
  }
  //d10
  if ((x>100+(75*3)&&x<100+(75*4))&&(y>230+(75*9)&&y<230+(75*10))) {
    d10=d10+2;
  }
  /////////////////////////////////////////////////////     E  CLICK BOXES     ////////////////////////////////////////////////////////
  //e1
  if ((x>100+(75*4)&&x<100+(75*5))&&(y>230&&y<230+(75*1))) {
    e1=e1+2;
  }
  //e2
  if ((x>100+(75*4)&&x<100+(75*5))&&(y>230+(75*1)&&y<230+(75*2))) {
    e2=e2+2;
  }
  //e3
  if ((x>100+(75*4)&&x<100+(75*5))&&(y>230+(75*2)&&y<230+(75*3))) {
    e3=e3+2;
  }
  //e4
  if ((x>100+(75*4)&&x<100+(75*5))&&(y>230+(75*3)&&y<230+(75*4))) {
    e4=e4+2;
  }
  //e5
  if ((x>100+(75*4)&&x<100+(75*5))&&(y>230+(75*4)&&y<230+(75*5))) {
    e5=e5+2;
  }
  //e6
  if ((x>100+(75*4)&&x<100+(75*5))&&(y>230+(75*5)&&y<230+(75*6))) {
    e6=e6+2;
  }
  //e7
  if ((x>100+(75*4)&&x<100+(75*5))&&(y>230+(75*6)&&y<230+(75*7))) {
    e7=e7+2;
  }
  //e8
  if ((x>100+(75*4)&&x<100+(75*5))&&(y>230+(75*7)&&y<230+(75*8))) {
    e8=e8+2;
  }
  //e9
  if ((x>100+(75*4)&&x<100+(75*5))&&(y>230+(75*8)&&y<230+(75*9))) {
    e9=e9+2;
  }
  //e10
  if ((x>100+(75*4)&&x<100+(75*5))&&(y>230+(75*9)&&y<230+(75*10))) {
    e10=e10+2;
  }
  /////////////////////////////////////////////////////     F  CLICK BOXES     ////////////////////////////////////////////////////////
  //f1
  if ((x>100+(75*5)&&x<100+(75*6))&&(y>230&&y<230+(75*1))) {
    f1=f1+2;
  }
  //f2
  if ((x>100+(75*5)&&x<100+(75*6))&&(y>230+(75*1)&&y<230+(75*2))) {
    f2=f2+2;
  }
  //f3
  if ((x>100+(75*5)&&x<100+(75*6))&&(y>230+(75*2)&&y<230+(75*3))) {
    f3=f3+2;
  }
  //f4
  if ((x>100+(75*5)&&x<100+(75*6))&&(y>230+(75*3)&&y<230+(75*4))) {
    f4=f4+2;
  }
  //f5
  if ((x>100+(75*5)&&x<100+(75*6))&&(y>230+(75*4)&&y<230+(75*5))) {
    f5=f5+2;
  }
  //f6
  if ((x>100+(75*5)&&x<100+(75*6))&&(y>230+(75*5)&&y<230+(75*6))) {
    f6=f6+2;
  }
  //f7
  if ((x>100+(75*5)&&x<100+(75*6))&&(y>230+(75*6)&&y<230+(75*7))) {
    f7=f7+2;
  }
  //f8
  if ((x>100+(75*5)&&x<100+(75*6))&&(y>230+(75*7)&&y<230+(75*8))) {
    f8=f8+2;
  }
  //f9
  if ((x>100+(75*5)&&x<100+(75*6))&&(y>230+(75*8)&&y<230+(75*9))) {
    f9=f9+2;
  }
  //f10
  if ((x>100+(75*5)&&x<100+(75*6))&&(y>230+(75*9)&&y<230+(75*10))) {
    f10=f10+2;
  }
  /////////////////////////////////////////////////////     G  CLICK BOXES     ////////////////////////////////////////////////////////
  //g1
  if ((x>100+(75*6)&&x<100+(75*7))&&(y>230&&y<230+(75*1))) {
    g1=g1+2;
  }
  //g2
  if ((x>100+(75*6)&&x<100+(75*7))&&(y>230+(75*1)&&y<230+(75*2))) {
    g2=g2+2;
  }
  //g3
  if ((x>100+(75*6)&&x<100+(75*7))&&(y>230+(75*2)&&y<230+(75*3))) {
    g3=g3+2;
  }
  //g4
  if ((x>100+(75*6)&&x<100+(75*7))&&(y>230+(75*3)&&y<230+(75*4))) {
    g4=g4+2;
  }
  //g5
  if ((x>100+(75*6)&&x<100+(75*7))&&(y>230+(75*4)&&y<230+(75*5))) {
    g5=g5+2;
  }
  //g6
  if ((x>100+(75*6)&&x<100+(75*7))&&(y>230+(75*5)&&y<230+(75*6))) {
    g6=g6+2;
  }
  //g7
  if ((x>100+(75*6)&&x<100+(75*7))&&(y>230+(75*6)&&y<230+(75*7))) {
    g7=g7+2;
  }
  //g8
  if ((x>100+(75*6)&&x<100+(75*7))&&(y>230+(75*7)&&y<230+(75*8))) {
    g8=g8+2;
  }
  //g9
  if ((x>100+(75*6)&&x<100+(75*7))&&(y>230+(75*8)&&y<230+(75*9))) {
    g9=g9+2;
  }
  //g10
  if ((x>100+(75*6)&&x<100+(75*7))&&(y>230+(75*9)&&y<230+(75*10))) {
    g10=g10+2;
  }
  /////////////////////////////////////////////////////     H  CLICK BOXES     ////////////////////////////////////////////////////////
  //h1
  if ((x>100+(75*7)&&x<100+(75*8))&&(y>230&&y<230+(75*1))) {
    h1=h1+2;
  }
  //h2
  if ((x>100+(75*7)&&x<100+(75*8))&&(y>230+(75*1)&&y<230+(75*2))) {
    h2=h2+2;
  }
  //h3
  if ((x>100+(75*7)&&x<100+(75*8))&&(y>230+(75*2)&&y<230+(75*3))) {
    h3=h3+2;
  }
  //h4
  if ((x>100+(75*7)&&x<100+(75*8))&&(y>230+(75*3)&&y<230+(75*4))) {
    h4=h4+2;
  }
  //h5
  if ((x>100+(75*7)&&x<100+(75*8))&&(y>230+(75*4)&&y<230+(75*5))) {
    h5=h5+2;
  }
  //h6
  if ((x>100+(75*7)&&x<100+(75*8))&&(y>230+(75*5)&&y<230+(75*6))) {
    h6=h6+2;
  }
  //h7
  if ((x>100+(75*7)&&x<100+(75*8))&&(y>230+(75*6)&&y<230+(75*7))) {
    h7=h7+2;
  }
  //h8
  if ((x>100+(75*7)&&x<100+(75*8))&&(y>230+(75*7)&&y<230+(75*8))) {
    h8=h8+2;
  }
  //h9
  if ((x>100+(75*7)&&x<100+(75*8))&&(y>230+(75*8)&&y<230+(75*9))) {
    h9=h9+2;
  }
  //h10
  if ((x>100+(75*7)&&x<100+(75*8))&&(y>230+(75*9)&&y<230+(75*10))) {
    h10=h10+2;
  }
  /////////////////////////////////////////////////////     I  CLICK BOXES     ////////////////////////////////////////////////////////
  //i1
  if ((x>100+(75*8)&&x<100+(75*9))&&(y>230&&y<230+(75*1))) {
    i1=i1+2;
  }
  //i2
  if ((x>100+(75*8)&&x<100+(75*9))&&(y>230+(75*1)&&y<230+(75*2))) {
    i2=i2+2;
  }
  //i3
  if ((x>100+(75*8)&&x<100+(75*9))&&(y>230+(75*2)&&y<230+(75*3))) {
    i3=i3+2;
  }
  //i4
  if ((x>100+(75*8)&&x<100+(75*9))&&(y>230+(75*3)&&y<230+(75*4))) {
    i4=i4+2;
  }
  //i5
  if ((x>100+(75*8)&&x<100+(75*9))&&(y>230+(75*4)&&y<230+(75*5))) {
    i5=i5+2;
  }
  //i6
  if ((x>100+(75*8)&&x<100+(75*9))&&(y>230+(75*5)&&y<230+(75*6))) {
    i6=i6+2;
  }
  //i7
  if ((x>100+(75*8)&&x<100+(75*9))&&(y>230+(75*6)&&y<230+(75*7))) {
    i7=i7+2;
  }
  //i8
  if ((x>100+(75*8)&&x<100+(75*9))&&(y>230+(75*7)&&y<230+(75*8))) {
    i8=i8+2;
  }
  //i9
  if ((x>100+(75*8)&&x<100+(75*9))&&(y>230+(75*8)&&y<230+(75*9))) {
    i9=i9+2;
  }
  //i10
  if ((x>100+(75*8)&&x<100+(75*9))&&(y>230+(75*9)&&y<230+(75*10))) {
    i10=i10+2;
  }
  /////////////////////////////////////////////////////     J  CLICK BOXES     ////////////////////////////////////////////////////////
  //j1
  if ((x>100+(75*9)&&x<100+(75*10))&&(y>230&&y<230+(75*1))) {
    j1=j1+2;
  }
  //j2
  if ((x>100+(75*9)&&x<100+(75*10))&&(y>230+(75*1)&&y<230+(75*2))) {
    j2=j2+2;
  }
  //j3
  if ((x>100+(75*9)&&x<100+(75*10))&&(y>230+(75*2)&&y<230+(75*3))) {
    j3=j3+2;
  }
  //j4
  if ((x>100+(75*9)&&x<100+(75*10))&&(y>230+(75*3)&&y<230+(75*4))) {
    j4=j4+2;
  }
  //j5
  if ((x>100+(75*9)&&x<100+(75*10))&&(y>230+(75*4)&&y<230+(75*5))) {
    j5=j5+2;
  }
  //j6
  if ((x>100+(75*9)&&x<100+(75*10))&&(y>230+(75*5)&&y<230+(75*6))) {
    j6=j6+2;
  }
  //j7
  if ((x>100+(75*9)&&x<100+(75*10))&&(y>230+(75*6)&&y<230+(75*7))) {
    j7=j7+2;
  }
  //j8
  if ((x>100+(75*9)&&x<100+(75*10))&&(y>230+(75*7)&&y<230+(75*8))) {
    j8=j8+2;
  }
  //j9
  if ((x>100+(75*9)&&x<100+(75*10))&&(y>230+(75*8)&&y<230+(75*9))) {
    j9=j9+2;
  }
  //j10
  if ((x>100+(75*9)&&x<100+(75*10))&&(y>230+(75*9)&&y<230+(75*10))) {
    j10=j10+2;
  }
  
  win();
  boardm = npc();

}
