Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Program: 6 Men's Morris Project
- //Programmer: [redacted]
- //Purpose: version of Mill game - mix between checkers and tictactoe
- //11,917 lines
- //last updated 3/6/12
- #include <iostream.h> // necessary for cin and cout commands
- #include <cstdlib> //necessary for rand( ) and srand( )
- #include <ctime> //necess for time( )
- #include <windows.h>
- #include <string.h>
- int main()
- {
- Top:
- //Variable declarations
- float Num1; //stores num1
- int R1; //randomizer
- string Move; // place a piece
- string M2; //move from
- string M3; //move to
- string Val = "\x01"; //who's turn it is
- //places to go on gameboard
- string V1 = "A";
- string V2 = "B";
- string V3 = "C";
- string V4 = "D";
- string V5 = "E";
- string V6 = "F";
- string V7 = "G";
- string V8 = "H";
- string V9 = "I";
- string V10 = "J";
- string V11 = "K";
- string V12 = "L";
- string V13 = "M";
- string V14 = "N";
- string V15 = "O";
- string V16 = "P";
- string Spot; //WHERE COMPUTER PLACED
- string S; //WHERE COMPUTER MOVED
- string S2; //WHERE COMPUTER MOVED
- string Took; //WHERE COMPUTER CAPTURED
- //how many pieces per color left
- string Dir = "Place a piece at: "; //Directions
- string D2 = " ";
- float N1 = 6; //black //placing pieces
- float N2 = 6;//white
- //capturing pieces
- int Ct1 = 6; //black \x01
- int Ct2 = 6; //white \x02
- int Mill = 0;
- int Mi2 = 0;
- //count how many pieces left if < 3 then u lose
- string Cap = ""; //choose piece to capture
- string Cap2 = "";
- float Ans = 0; //play again
- system("cls");
- Start:
- //Ask User for input
- system("mode 100 , 50");
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " ************************\n";
- cout << " \x02 Six-Men's Morris \x01 \n";
- cout << " \x01 \x02\n";
- cout << " \x02 1) 2 Players \x01\n";
- cout << " \x02 2) Vs. Computer \x01\n";
- cout << " \x01 3) Help \x02\n";
- cout << " \x02 4) Exit \x01\n";
- cout << " \x01 \x02\n";
- cout << " ************************\n";
- cout << " \n";
- cout << " Make a selection: ";
- cin >> Num1;
- //\x01 black, x02 white piece
- if (Num1 == 1)
- {
- system("cls");
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n"; //find who goes first
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " To see who goes first: \n";
- cout << " ";
- system("pause");
- cout << " \n";
- srand((unsigned)time(0));//randomizer
- R1 = (rand()%2) +1; //1-2
- if (R1 == 1)
- {
- cout << " Player \x01 goes first. \n";
- Val = "\x01";
- }
- if (R1 >= 2)
- {
- cout << " Player \x02 goes first. \n";
- Val = "\x02";
- }
- cout << " ";
- system("pause");
- system("cls");
- Board:
- if (N1 < 0)
- {
- N1 = 0;
- }
- if (N2 < 0)
- {
- N2 = 0;
- }
- system("cls");
- cout << " \n";
- cout << " \n";
- cout << " \x01 Six-Men's Morris \x02 \n";
- cout << " \n";
- cout << " b \n";
- cout << " \n";
- cout << " a "<<V1<<"\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4"<<V2<<"\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4"<<V3<<" c\n";
- cout << " \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3\n";
- cout << " \xb3 j "<<V10<<"\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4"<<V11<<"\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4"<<V12<<" l \xb3\n";
- cout << " \xb3 \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 k \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3 \xb3\n";
- cout << " h "<<V8<<"\xc4\xc4\xc4\xc4\xc4\xc4\xc4"<<V9<<" i m "<<V13<<"\xc4\xc4\xc4\xc4\xc4\xc4\xc4"<<V4<<" d \n";
- cout << " \xb3 \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 o \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3 \xb3\n";
- cout << " \xb3 p "<<V16<<"\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4"<<V15<<"\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4"<<V14<<" n \xb3\n";
- cout << " \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3\n";
- cout << " g "<<V7<<"\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4"<<V6<<"\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4"<<V5<<" e\n";
- cout << " \n";
- cout << " f \n";
- cout << " \n";
- //Matching
- //ABC (8 MILLS)
- if (V1=="\x01" && V2 =="\x01" && V3 =="\x01" && Mill == 1) //put if match the mill = 1 wherever \xo1 at ABC
- {//Match ABC black pieces
- CBA:
- cout << " You formed a mill, choose a piece to capture.\n";
- cout << " Capture the piece at spot: ";
- cin >> Cap;
- //Capture a white piece
- if (Cap == "A" || Cap == "a")
- {
- if (V1 == "\x02")
- {
- V1 = "A";
- goto A1;
- }
- if (V1 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap == "B" || Cap == "b")
- {
- if (V2 == "\x02")
- {
- V2 = "B";
- goto A1;
- }
- if (V2 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap == "C" || Cap == "c")
- {
- if (V3 == "\x02")
- {
- V3 = "C";
- goto A1;
- }
- if (V3 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap == "D" || Cap == "d")
- {
- if (V4 == "\x02")
- {
- V4 = "D";
- goto A1;
- }
- if (V4 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap == "E" || Cap == "e")
- {
- if (V5 == "\x02")
- {
- V5 = "E";
- goto A1;
- }
- if (V5 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap == "F" || Cap == "f")
- {
- if (V6 == "\x02")
- {
- V6 = "F";
- goto A1;
- }
- if (V6 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap == "G" || Cap == "g")
- {
- if (V7 == "\x02")
- {
- V7 = "G";
- goto A1;
- }
- if (V7 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap == "H" || Cap == "h")
- {
- if (V8 == "\x02")
- {
- V8 = "H";
- goto A1;
- }
- if (V8 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap == "I" || Cap == "i")
- {
- if (V9 == "\x02")
- {
- V9 = "I";
- goto A1;
- }
- if (V9 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap == "J" || Cap == "j")
- {
- if (V10 == "\x02")
- {
- V10 = "J";
- goto A1;
- }
- if (V10 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap == "K" || Cap == "k")
- {
- if (V11 == "\x02")
- {
- V11 = "K";
- goto A1;
- }
- if (V11 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap == "L" || Cap == "l")
- {
- if (V12 == "\x02")
- {
- V12 = "L";
- goto A1;
- }
- if (V12 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap == "M" || Cap == "m")
- {
- if (V13 == "\x02")
- {
- V13 = "M";
- goto A1;
- }
- if (V13 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap == "N" || Cap == "n")
- {
- if (V14 == "\x02")
- {
- V14 = "N";
- goto A1;
- }
- if (V14 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap == "O" || Cap == "o")
- {
- if (V15 == "\x02")
- {
- V15 = "O";
- goto A1;
- }
- if (V15 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap == "P" || Cap == "p")
- {
- if (V16 == "\x02")
- {
- V16 = "P";
- goto A1;
- }
- if (V16 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- A1:
- Ct2 = Ct2 - 1; //lost a piece
- Mill = 0;
- system("cls");
- goto Board;
- }
- if (V1=="\x02" && V2 =="\x02" && V3 =="\x02" && Mi2 == 1)
- {//Match ABC white pieces
- CWA:
- cout << " You formed a mill, choose a piece to capture.\n";
- cout << " Capture the piece at spot: ";
- cin >> Cap2;
- //Capture a black piece
- if (Cap2 == "A" || Cap2 == "a")
- {
- if (V1 == "\x01")
- {
- V1 = "A";
- goto B1;
- }
- if (V1 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap2 == "B" || Cap2 == "b")
- {
- if (V2 == "\x01")
- {
- V2 = "B";
- goto B1;
- }
- if (V2 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap2 == "C" || Cap2 == "c")
- {
- if (V3 == "\x01")
- {
- V3 = "C";
- goto B1;
- }
- if (V3 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap2 == "D" || Cap2 == "d")
- {
- if (V4 == "\x01")
- {
- V4 = "D";
- goto B1;
- }
- if (V4 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap2 == "E" || Cap2 == "e")
- {
- if (V5 == "\x01")
- {
- V5 = "E";
- goto B1;
- }
- if (V5 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap2 == "F" || Cap2 == "f")
- {
- if (V6 == "\x01")
- {
- V6 = "F";
- goto B1;
- }
- if (V6 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap2 == "G" || Cap2 == "g")
- {
- if (V7 == "\x01")
- {
- V7 = "G";
- goto B1;
- }
- if (V7 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap2 == "H" || Cap2 == "h")
- {
- if (V8 == "\x01")
- {
- V8 = "H";
- goto B1;
- }
- if (V8 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap2 == "I" || Cap2 == "i")
- {
- if (V9 == "\x01")
- {
- V9 = "I";
- goto B1;
- }
- if (V9 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap2 == "J" || Cap2 == "j")
- {
- if (V10 == "\x01")
- {
- V10 = "J";
- goto B1;
- }
- if (V10 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap2 == "K" || Cap2 == "k")
- {
- if (V11 == "\x01")
- {
- V11 = "K";
- goto B1;
- }
- if (V11 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap2 == "L" || Cap2 == "l")
- {
- if (V12 == "\x01")
- {
- V12 = "L";
- goto B1;
- }
- if (V12 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap2 == "M" || Cap2 == "m")
- {
- if (V13 == "\x01")
- {
- V13 = "M";
- goto B1;
- }
- if (V13 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap2 == "N" || Cap2 == "n")
- {
- if (V14 == "\x01")
- {
- V14 = "N";
- goto B1;
- }
- if (V14 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap2 == "O" || Cap2 == "o")
- {
- if (V15 == "\x01")
- {
- V15 = "O";
- goto B1;
- }
- if (V15 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Cap2 == "P" || Cap2 == "p")
- {
- if (V16 == "\x01")
- {
- V16 = "P";
- goto B1;
- }
- if (V16 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- B1:
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- goto Board;
- }
- //AHG
- if (V1=="\x01" && V8 =="\x01" && V7 =="\x01" && Mill == 1)
- {//Match AHG black pieces
- goto CBA;
- }
- if (V1=="\x02" && V8 =="\x02" && V7 =="\x02" && Mi2 == 1)
- {//Match AHG white pieces
- goto CWA;
- }
- //CDE
- if (V3=="\x01" && V4 =="\x01" && V5 =="\x01" && Mill == 1)
- {//Match CDE black pieces
- goto CBA;
- }
- if (V3=="\x02" && V4 =="\x02" && V5 =="\x02" && Mi2 == 1)
- {//Match CDE white pieces
- goto CWA;
- }
- //EFG
- if (V5=="\x01" && V6 =="\x01" && V7 =="\x01" && Mill == 1)
- {//Match EFG black pieces
- goto CBA;
- }
- if (V5=="\x02" && V6 =="\x02" && V7 =="\x02" && Mi2 == 1)
- {//Match EFG white pieces
- goto CWA;
- }
- //JKL
- if (V10=="\x01" && V11 =="\x01" && V12 =="\x01" && Mill == 1)
- {//Match JKL black pieces
- goto CBA;
- }
- if (V10=="\x02" && V11 =="\x02" && V12 =="\x02" && Mi2 == 1)
- {//Match JKL white pieces
- goto CWA;
- }
- //LMN
- if (V12=="\x01" && V13 =="\x01" && V14 =="\x01" && Mill == 1)
- {//Match LMN black pieces
- goto CBA;
- }
- if (V12=="\x02" && V13 =="\x02" && V14 =="\x02" && Mi2 == 1)
- {//Match LMN white pieces
- goto CWA;
- }
- //NOP
- if (V14=="\x01" && V15 =="\x01" && V16 =="\x01" && Mill == 1)
- {//Match NOP black pieces
- goto CBA;
- }
- if (V14=="\x02" && V15 =="\x02" && V16 =="\x02" && Mi2 == 1)
- {//Match NOP white pieces
- goto CWA;
- }
- //JIP
- if (V10=="\x01" && V9 =="\x01" && V16 =="\x01" && Mill == 1)
- {//Match JIP black pieces
- goto CBA;
- }
- if (V10=="\x02" && V9 =="\x02" && V16 =="\x02" && Mi2 == 1)
- {//Match JIP white pieces
- goto CWA;
- }
- //if < 3 pieces left then win
- if (Ct1 < 3)
- {
- system("cls"); //winning smiley face
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \x02\x02\x02\x02\x02\x02\x02\x02\x02\x02 \n";
- cout << " \x02 \x02 \n";
- cout << " \x02 \x02 \x02 \x02 \n";
- cout << " \x02 \x02\x02\x02 \x02\x02\x02 \x02 \n";
- cout << " \x02 \x02 \x02 \x02 \n";
- cout << " \x02 \x02 \n";
- cout << " \x02 \x02 \x02 \x02 \n";
- cout << " \x02 \x02 \x02 \x02 \n";
- cout << " \x02 \x02\x02\x02\x02\x02\x02 \x02 \n";
- cout << " \x02 \x02 \n";
- cout << " \x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\n";
- cout << " \n";
- cout << " Player \x02 wins. \n";
- cout << " Do you want to play again? \n";
- cout << " 1) Yes \n"; //play again
- cout << " 2) No \n";
- cout << " Make a selection: ";
- cin >> Ans;
- if (Ans == 1)
- {
- system("cls");
- goto Top;
- }
- if (Ans >= 2)
- {
- system("cls");
- return 0;
- }
- }
- if (Ct2 < 3)
- {
- system("cls"); //winning smiley face
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \x01\x01\x01\x01\x01\x01\x01\x01\x01\x01 \n";
- cout << " \x01 \x01 \n";
- cout << " \x01 \x01 \x01 \x01 \n";
- cout << " \x01 \x01\x01\x01 \x01\x01\x01 \x01 \n";
- cout << " \x01 \x01 \x01 \x01 \n";
- cout << " \x01 \x01 \n";
- cout << " \x01 \x01 \x01 \x01 \n";
- cout << " \x01 \x01 \x01 \x01 \n";
- cout << " \x01 \x01\x01\x01\x01\x01\x01 \x01 \n";
- cout << " \x01 \x01 \n";
- cout << " \x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\n";
- cout << " \n";
- cout << " Player \x01 wins. \n";
- cout << " Do you want to play again? \n";
- cout << " 1) Yes \n"; //play again
- cout << " 2) No \n";
- cout << " Make a selection: ";
- cin >> Ans;
- if (Ans == 1)
- {
- system("cls");
- goto Top;
- }
- if (Ans >= 2)
- {
- system("cls");
- return 0;
- }
- }
- //MOVE BOARD
- if (Mill < 1 && Mi2 < 1)
- {
- if (N1 <= 0 && N2 <=0)
- {
- cout << " \xc9\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcb\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xbb\n";
- cout << " \xba Moving: \xba Pieces Left: \xba \n";
- cout << " \xba \xba \x01 " <<Ct1<<" \xba\n";
- cout << " \xba "<<Val<<" \xba \xba\n";
- cout << " \xba \xba \x02 " <<Ct2<<" \xba\n";
- cout << " \xc8\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xca\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xbc\n";
- cout << " \n";
- }
- if (N1 > 0 || N2 >0)
- {
- cout << " \xc9\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcb\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcb\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xbb\n";
- cout << " \xba Moving: \xba Pieces Left: \xba Pieces Left to Place: \xba \n";
- cout << " \xba \xba \x01 " <<Ct1<<" \xba \x01 " <<N1<<" \xba\n";
- cout << " \xba "<<Val<<" \xba \xba \xba\n";
- cout << " \xba \xba \x02 " <<Ct2<<" \xba \x02 " <<N2<<" \xba\n";
- cout << " \xc8\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xca\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xca\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xbc\n";
- cout << " \n";
- }
- }
- if (N1 <= 0 && Val == "\x01" && Mill < 1 && Mi2 < 1) //MOVE PIECES
- {
- Dir = "Move a piece from: ";
- cout << " "<<Dir<<" ";
- cin >> M2;
- D2 = "to: ";
- cout << " "<<D2<<" ";
- cin >> M3;
- cout << " \n";
- }
- if (N2 <= 0 && Val == "\x02" && Mill < 1 && Mi2 < 1)
- {
- Dir = "Move a piece from: ";
- cout << " "<<Dir<<" ";
- cin >> M2;
- D2 = "to: ";
- cout << " "<<D2<<" ";
- cin >> M3;
- cout << " \n";
- }
- if (N1 > 0 && Val == "\x01" && Mill < 1 && Mi2 < 1) //PLACE PIECES
- {
- cout << " "<<Dir<<" ";
- cin >> Move;
- cout << " "<<D2<<" \n";
- }
- if (N2 > 0 && Val == "\x02" && Mill < 1 && Mi2 <1)
- {
- cout << " "<<Dir<<" ";
- cin >> Move;
- cout << " "<<D2<<" \n";
- }
- //place pieces
- if ((Move == "A" || Move == "a") && V1 == "A" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V1 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V1=="\x01" && V2 =="\x01" && V3 =="\x01")
- {
- Mill = 1;
- }
- if (V1=="\x01" && V8 =="\x01" && V7 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x02")
- {
- V1 = "\x02";
- Val = "\x01";
- N2 = N2 - 1;
- if (V1=="\x02" && V2 =="\x02" && V3 =="\x02")
- {
- Mi2 = 1;
- }
- if (V1=="\x02" && V8 =="\x02" && V7 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- }
- if ((Move == "A" || Move == "a") && V1 != "A" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((Move == "B" || Move == "b") && V2 == "B" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V2 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V1=="\x01" && V2 =="\x01" && V3 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x02")
- {
- V2 = "\x02";
- Val = "\x01";
- N2 = N2 - 1;
- if (V1=="\x02" && V2 =="\x02" && V3 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- }
- if ((Move == "B" || Move == "b") && V2 != "B" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((Move == "C" || Move == "c") && V3 == "C" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V3 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V1=="\x01" && V2 =="\x01" && V3 =="\x01")
- {
- Mill = 1;
- }
- if (V3=="\x01" && V4 =="\x01" && V5 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x02")
- {
- V3 = "\x02";
- Val = "\x01";
- N2 = N2 - 1;
- if (V1=="\x02" && V2 =="\x02" && V3 =="\x02")
- {
- Mi2 = 1;
- }
- if (V3=="\x02" && V4 =="\x02" && V5 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- }
- if ((Move == "C" || Move == "c") && V3 != "C" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((Move == "D" || Move == "d") && V4 == "D" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V4 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V3=="\x01" && V4 =="\x01" && V5 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x02")
- {
- V4 = "\x02";
- Val = "\x01";
- N2 = N2 - 1;
- if (V3=="\x02" && V4 =="\x02" && V5 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- }
- if ((Move == "D" || Move == "d") && V4 != "D" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((Move == "E" || Move == "e") && V5 == "E" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V5 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V3=="\x01" && V4 =="\x01" && V5 =="\x01")
- {
- Mill = 1;
- }
- if (V5=="\x01" && V6 =="\x01" && V7 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x02")
- {
- V5 = "\x02";
- Val = "\x01";
- N2 = N2 - 1;
- if (V3=="\x02" && V4 =="\x02" && V5 =="\x02")
- {
- Mi2 = 1;
- }
- if (V5=="\x02" && V6 =="\x02" && V7 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- }
- if ((Move == "E" || Move == "e") && V5 != "E" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((Move == "F" || Move == "f") && V6 == "F" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V6 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V5=="\x01" && V6 =="\x01" && V7 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x02")
- {
- V6 = "\x02";
- Val = "\x01";
- N2 = N2 - 1;
- if (V5=="\x02" && V6 =="\x02" && V7 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- }
- if ((Move == "F" || Move == "f") && V6 != "F" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((Move == "G" || Move == "g") && V7 == "G" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V7 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V1=="\x01" && V8 =="\x01" && V7 =="\x01")
- {
- Mill = 1;
- }
- if (V5=="\x01" && V6 =="\x01" && V7 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x02")
- {
- V7 = "\x02";
- Val = "\x01";
- N2 = N2 - 1;
- if (V1=="\x02" && V8 =="\x02" && V7 =="\x02")
- {
- Mi2 = 1;
- }
- if (V5=="\x02" && V6 =="\x02" && V7 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- }
- if ((Move == "G" || Move == "g") && V7 != "G" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((Move == "H" || Move == "h") && V8 == "H" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V8 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V1=="\x01" && V8 =="\x01" && V7 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x02")
- {
- V8 = "\x02";
- Val = "\x01";
- N2 = N2 - 1;
- if (V1=="\x02" && V8 =="\x02" && V7 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- }
- if ((Move == "H" || Move == "h") && V8 != "H" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((Move == "I" || Move == "i") && V9 == "I" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V9 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V10=="\x01" && V9 =="\x01" && V16 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x02")
- {
- V9 = "\x02";
- Val = "\x01";
- N2 = N2 - 1;
- if (V10=="\x02" && V9 =="\x02" && V16 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- }
- if ((Move == "I" || Move == "i") && V9 != "I" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((Move == "J" || Move == "j") && V10 == "J" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V10 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V10=="\x01" && V11 =="\x01" && V12 =="\x01")
- {
- Mill = 1;
- }
- if (V10=="\x01" && V9 =="\x01" && V16 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x02")
- {
- V10 = "\x02";
- Val = "\x01";
- N2 = N2 - 1;
- if (V10=="\x02" && V11 =="\x02" && V12 =="\x02")
- {
- Mi2 = 1;
- }
- if (V10=="\x02" && V9 =="\x02" && V16 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- }
- if ((Move == "J" || Move == "j") && V10 != "J" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((Move == "K" || Move == "k") && V11 == "K" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V11 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V10=="\x01" && V11 =="\x01" && V12 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x02")
- {
- V11 = "\x02";
- Val = "\x01";
- N2 = N2 - 1;
- if (V10=="\x02" && V11 =="\x02" && V12 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- }
- if ((Move == "K" || Move == "k") && V11 != "K" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((Move == "L" || Move == "l") && V12 == "L" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V12 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V10=="\x01" && V11 =="\x01" && V12 =="\x01")
- {
- Mill = 1;
- }
- if (V12=="\x01" && V13 =="\x01" && V14 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x02")
- {
- V12 = "\x02";
- Val = "\x01";
- N2 = N2 - 1;
- if (V10=="\x02" && V11 =="\x02" && V12 =="\x02")
- {
- Mi2 = 1;
- }
- if (V12=="\x02" && V13 =="\x02" && V14 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- }
- if ((Move == "L" || Move == "l") && V12 != "L" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((Move == "M" || Move == "m") && V13 == "M" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V13 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V12=="\x01" && V13 =="\x01" && V14 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x02")
- {
- V13 = "\x02";
- Val = "\x01";
- N2 = N2 - 1;
- if (V12=="\x02" && V13 =="\x02" && V14 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- }
- if ((Move == "M" || Move == "m") && V13 != "M" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((Move == "N" || Move == "n") && V14 == "N" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V14 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V12=="\x01" && V13 =="\x01" && V14 =="\x01")
- {
- Mill = 1;
- }
- if (V14=="\x01" && V15 =="\x01" && V16 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x02")
- {
- V14 = "\x02";
- Val = "\x01";
- N2 = N2 - 1;
- if (V12=="\x02" && V13 =="\x02" && V14 =="\x02")
- {
- Mi2 = 1;
- }
- if (V14=="\x02" && V15 =="\x02" && V16 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- }
- if ((Move == "N" || Move == "n") && V14 != "N" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((Move == "O" || Move == "o") && V15 == "O" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V15 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V14=="\x01" && V15 =="\x01" && V16 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x02")
- {
- V15 = "\x02";
- Val = "\x01";
- N2 = N2 - 1;
- if (V14=="\x02" && V15 =="\x02" && V16 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- }
- if ((Move == "O" || Move == "o") && V15 != "O" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((Move == "P" || Move == "p") && V16 == "P" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V16 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V14=="\x01" && V15 =="\x01" && V16 =="\x01")
- {
- Mill = 1;
- }
- if (V10=="\x01" && V9 =="\x01" && V16 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x02")
- {
- V16 = "\x02";
- Val = "\x01";
- N2 = N2 - 1;
- if (V14=="\x02" && V15 =="\x02" && V16 =="\x02")
- {
- Mi2 = 1;
- }
- if (V10=="\x02" && V9 =="\x02" && V16 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- }
- if ((Move == "P" || Move == "p") && V16 != "P" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- //Outer board move code
- //Move pieces A to b or h
- if ((M2 == "A" || M2 == "a") && V1 != "A") //add 9 spaces
- {
- if ((M3 == "B" || M3 == "b") && V2 == "B")
- {
- if ( Val == "\x01" && V1 == "\x01")
- {
- V2 = "\x01";
- V1 = "A";
- Val = "\x02";
- goto Board;
- }
- if ( Val == "\x01" && V1 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V1 == "\x02")
- {
- V2 = "\x02";
- V1 = "A";
- Val = "\x01";
- goto Board;
- }
- if ( Val == "\x02" && V1 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "B" || M3 == "b") && V2 != "B")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 == "H" || M3 == "h") && V8 == "H")
- {
- if ( Val == "\x01" && V1 == "\x01")
- {
- V8 = "\x01";
- V1 = "A";
- Val = "\x02";
- goto Board;
- }
- if ( Val == "\x01" && V1 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V1 == "\x02")
- {
- V8 = "\x02";
- V1 = "A";
- Val = "\x01";
- goto Board;
- }
- if ( Val == "\x02" && V1 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "H" || M3 == "h") && V8 != "H")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 != "B" || M3 != "b") || (M3 != "H" || M3 !="h"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M2 == "A" || M2 =="a") && V1 == "A")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- //Move from B to c a k
- if ((M2 == "B" || M2 == "b") && V2 != "B")
- {
- if ((M3 == "C" || M3 == "c") && V3 == "C")
- {
- if ( Val == "\x01" && V2 == "\x01")
- {
- V3 = "\x01";
- V2 = "B";
- Val = "\x02";
- if (V3=="\x01" && V4 =="\x01" && V5 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x01" && V2 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V2 == "\x02")
- {
- V3 = "\x02";
- V2 = "B";
- Val = "\x01";
- if (V3=="\x02" && V4 =="\x02" && V5 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- if ( Val == "\x02" && V2 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "C" || M3 == "c") && V3 != "C")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 == "A" || M3 == "a") && V1 == "A")
- {
- if ( Val == "\x01" && V2 == "\x01")
- {
- V1 = "\x01";
- V2 = "B";
- Val = "\x02";
- if (V1=="\x01" && V8 =="\x01" && V7 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x01" && V2 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V2 == "\x02")
- {
- V1 = "\x02";
- V2 = "B";
- Val = "\x01";
- if (V1=="\x02" && V8 =="\x02" && V7 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- if ( Val == "\x02" && V2 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "A" || M3 == "a") && V1 != "A")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 == "K" || M3 == "k") && V11 == "K")
- {
- if ( Val == "\x01" && V2 == "\x01")
- {
- V11 = "\x01";
- V2 = "B";
- Val = "\x02";
- if (V10=="\x01" && V11 =="\x01" && V12 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x01" && V2 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V2 == "\x02")
- {
- V11 = "\x02";
- V2 = "B";
- Val = "\x01";
- if (V10=="\x02" && V11 =="\x02" && V12 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- if ( Val == "\x02" && V2 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "K" || M3 == "k") && V11 != "K")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 != "A" || M3 != "a") || (M3 != "C" || M3 !="c") || (M3 != "K" || M3 != "k"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M2 == "B" || M2 =="b") && V2 == "B")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- //Move C to b d
- if ((M2 == "C" || M2 == "c") && V3 != "C")
- {
- if ((M3 == "B" || M3 == "b") && V2 == "B")
- {
- if ( Val == "\x01" && V3 == "\x01")
- {
- V2 = "\x01";
- V3 = "C";
- Val = "\x02";
- goto Board;
- }
- if ( Val == "\x01" && V3 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V3 == "\x02")
- {
- V2 = "\x02";
- V3 = "C";
- Val = "\x01";
- goto Board;
- }
- if ( Val == "\x02" && V3 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "C" || M3 == "c") && V3 != "C")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 == "D" || M3 == "d") && V4 == "D")
- {
- if ( Val == "\x01" && V3 == "\x01")
- {
- V4 = "\x01";
- V3 = "C";
- Val = "\x02";
- goto Board;
- }
- if ( Val == "\x01" && V3 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V3 == "\x02")
- {
- V4 = "\x02";
- V3 = "C";
- Val = "\x01";
- goto Board;
- }
- if ( Val == "\x02" && V3 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "D" || M3 == "d") && V4 != "D")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 != "B" || M3 != "b") || (M3 != "D" || M3 !="d"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M2 == "C" || M2 =="c") && V3 == "C")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- //Move D to c e m
- if ((M2 == "D" || M2 == "d") && V4 != "D")
- {
- if ((M3 == "C" || M3 == "c") && V3 == "C")
- {
- if ( Val == "\x01" && V4 == "\x01")
- {
- V3 = "\x01";
- V4 = "D";
- Val = "\x02";
- if (V1=="\x01" && V2 =="\x01" && V3 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x01" && V4 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V4 == "\x02")
- {
- V3 = "\x02";
- V4 = "D";
- Val = "\x01";
- if (V1=="\x02" && V2 =="\x02" && V3 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- if ( Val == "\x02" && V4 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "C" || M3 == "c") && V3 != "C")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 == "E" || M3 == "e") && V5 == "E")
- {
- if ( Val == "\x01" && V4 == "\x01")
- {
- V5 = "\x01";
- V4 = "D";
- Val = "\x02";
- if (V5=="\x01" && V6 =="\x01" && V7 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x01" && V4 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V4 == "\x02")
- {
- V5 = "\x02";
- V4 = "D";
- Val = "\x01";
- if (V5=="\x02" && V6 =="\x02" && V7 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- if ( Val == "\x02" && V4 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "E" || M3 == "e") && V5 != "E")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 == "M" || M3 == "m") && V13 == "M")
- {
- if ( Val == "\x01" && V4 == "\x01")
- {
- V13 = "\x01";
- V4 = "D";
- Val = "\x02";
- if (V12=="\x01" && V13 =="\x01" && V14 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x01" && V4 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V4 == "\x02")
- {
- V13 = "\x02";
- V4 = "D";
- Val = "\x01";
- if (V12=="\x02" && V13 =="\x02" && V14 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- if ( Val == "\x02" && V4 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "M" || M3 == "m") && V13 != "M")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 != "C" || M3 != "c") || (M3 != "E" || M3 !="e") || (M3 != "M" || M3 != "m"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M2 == "D" || M2 =="d") && V4 == "D")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- //Move E to d or f
- if ((M2 == "E" || M2 == "e") && V5 != "E")
- {
- if ((M3 == "D" || M3 == "d") && V4 == "D")
- {
- if ( Val == "\x01" && V5 == "\x01")
- {
- V4 = "\x01";
- V5 = "E";
- Val = "\x02";
- goto Board;
- }
- if ( Val == "\x01" && V5 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V5 == "\x02")
- {
- V4 = "\x02";
- V5 = "E";
- Val = "\x01";
- goto Board;
- }
- if ( Val == "\x02" && V5 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "D" || M3 == "d") && V4 != "D")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 == "F" || M3 == "f") && V6 == "F")
- {
- if ( Val == "\x01" && V5 == "\x01")
- {
- V6 = "\x01";
- V5 = "E";
- Val = "\x02";
- goto Board;
- }
- if ( Val == "\x01" && V5 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V5 == "\x02")
- {
- V6 = "\x02";
- V5 = "E";
- Val = "\x01";
- goto Board;
- }
- if ( Val == "\x02" && V5 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "F" || M3 == "f") && V6 != "F")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 != "D" || M3 != "d") || (M3 != "F" || M3 !="f"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M2 == "E" || M2 =="e") && V5 == "E")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- //move F to e o g
- if ((M2 == "F" || M2 == "f") && V6 != "F")
- {
- if ((M3 == "E" || M3 == "e") && V5 == "E")
- {
- if ( Val == "\x01" && V6 == "\x01")
- {
- V5 = "\x01";
- V6 = "F";
- Val = "\x02";
- if (V3=="\x01" && V4 =="\x01" && V5 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x01" && V6 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V6 == "\x02")
- {
- V5 = "\x02";
- V6 = "F";
- Val = "\x01";
- if (V3=="\x02" && V4 =="\x02" && V5 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- if ( Val == "\x02" && V6 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "E" || M3 == "e") && V5 != "E")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 == "o" || M3 == "O") && V15 == "O")
- {
- if ( Val == "\x01" && V6 == "\x01")
- {
- V15 = "\x01";
- V6 = "F";
- Val = "\x02";
- if (V14=="\x01" && V15 =="\x01" && V16 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x01" && V6 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V6 == "\x02")
- {
- V15 = "\x02";
- V6 = "F";
- Val = "\x01";
- if (V14=="\x02" && V15 =="\x02" && V16 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- if ( Val == "\x02" && V6 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "O" || M3 == "o") && V15 != "O")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 == "G" || M3 == "g") && V7 == "G")
- {
- if ( Val == "\x01" && V6 == "\x01")
- {
- V7 = "\x01";
- V6 = "F";
- Val = "\x02";
- if (V1=="\x01" && V8 =="\x01" && V7 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x01" && V6 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V6 == "\x02")
- {
- V7 = "\x02";
- V6 = "F";
- Val = "\x01";
- if (V1=="\x02" && V8 =="\x02" && V7 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- if ( Val == "\x02" && V6 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "G" || M3 == "g") && V7 != "G")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 != "E" || M3 != "e") || (M3 != "O" || M3 !="o") || (M3 != "G" || M3 != "g"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M2 == "F" || M2 =="f") && V6 == "F")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- //Move G to F H
- if ((M2 == "G" || M2 == "g") && V7 != "G")
- {
- if ((M3 == "F" || M3 == "f") && V6 == "F")
- {
- if ( Val == "\x01" && V7 == "\x01")
- {
- V6 = "\x01";
- V7 = "G";
- Val = "\x02";
- goto Board;
- }
- if ( Val == "\x01" && V7 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V7 == "\x02")
- {
- V6 = "\x02";
- V7 = "G";
- Val = "\x01";
- goto Board;
- }
- if ( Val == "\x02" && V7 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "F" || M3 == "f") && V6 != "F")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 == "H" || M3 == "h") && V8 == "H")
- {
- if ( Val == "\x01" && V7 == "\x01")
- {
- V8 = "\x01";
- V7 = "G";
- Val = "\x02";
- goto Board;
- }
- if ( Val == "\x01" && V7 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V7 == "\x02")
- {
- V8 = "\x02";
- V7 = "G";
- Val = "\x01";
- goto Board;
- }
- if ( Val == "\x02" && V7 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "H" || M3 == "h") && V8 != "H")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 != "F" || M3 != "f") || (M3 != "H" || M3 !="h"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M2 == "G" || M2 =="g") && V7 == "G")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- //Move H to a g i
- if ((M2 == "H" || M2 == "h") && V8 != "H")
- {
- if ((M3 == "A" || M3 == "a") && V1 == "A")
- {
- if ( Val == "\x01" && V8 == "\x01")
- {
- V1 = "\x01";
- V8 = "H";
- Val = "\x02";
- if (V1=="\x01" && V2 =="\x01" && V3 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x01" && V8 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V8 == "\x02")
- {
- V1 = "\x02";
- V8 = "H";
- Val = "\x01";
- if (V1=="\x02" && V2 =="\x02" && V3 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- if ( Val == "\x02" && V8 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "A" || M3 == "a") && V1 != "A")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 == "g" || M3 == "G") && V7 == "G")
- {
- if ( Val == "\x01" && V8 == "\x01")
- {
- V7 = "\x01";
- V8 = "H";
- Val = "\x02";
- if (V5=="\x01" && V6 =="\x01" && V7 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x01" && V8 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V8 == "\x02")
- {
- V7 = "\x02";
- V8 = "H";
- Val = "\x01";
- if (V5=="\x02" && V6 =="\x02" && V7 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- if ( Val == "\x02" && V8 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "G" || M3 == "g") && V7 != "G")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 == "I" || M3 == "i") && V9 == "I")
- {
- if ( Val == "\x01" && V8 == "\x01")
- {
- V9 = "\x01";
- V8 = "H";
- Val = "\x02";
- if (V10=="\x01" && V9 =="\x01" && V16 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x01" && V8 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V8 == "\x02")
- {
- V9 = "\x02";
- V8 = "H";
- Val = "\x01";
- if (V10=="\x02" && V9 =="\x02" && V16 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- if ( Val == "\x02" && V8 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "I" || M3 == "i") && V9 != "I")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 != "A" || M3 != "a") || (M3 != "G" || M3 !="g") || (M3 != "I" || M3 != "i"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M2 == "H" || M2 =="h") && V8 == "H")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- //Inner board move code
- //move I to h j p
- if ((M2 == "I" || M2 == "i") && V9 != "I")
- {
- if ((M3 == "H" || M3 == "h") && V8 == "H")
- {
- if ( Val == "\x01" && V9 == "\x01")
- {
- V8 = "\x01";
- V9 = "I";
- Val = "\x02";
- if (V1=="\x01" && V8 =="\x01" && V7 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x01" && V9 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V9 == "\x02")
- {
- V8 = "\x02";
- V9 = "I";
- Val = "\x01";
- if (V1=="\x02" && V8 =="\x02" && V7 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- if ( Val == "\x02" && V9 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "H" || M3 == "h") && V8 != "H")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 == "J" || M3 == "j") && V10 == "J")
- {
- if ( Val == "\x01" && V9 == "\x01")
- {
- V10 = "\x01";
- V9 = "I";
- Val = "\x02";
- if (V10=="\x01" && V11 =="\x01" && V12 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x01" && V9 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V9 == "\x02")
- {
- V10 = "\x02";
- V9 = "I";
- Val = "\x01";
- if (V10=="\x02" && V11 =="\x02" && V12 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- if ( Val == "\x02" && V9 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "J" || M3 == "j") && V10 != "J")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 == "P" || M3 == "p") && V16 == "P")
- {
- if ( Val == "\x01" && V9 == "\x01")
- {
- V16 = "\x01";
- V9 = "I";
- Val = "\x02";
- if (V14=="\x01" && V15 =="\x01" && V16 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x01" && V9 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V9 == "\x02")
- {
- V16 = "\x02";
- V9 = "I";
- Val = "\x01";
- if (V14=="\x02" && V15 =="\x02" && V16 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- if ( Val == "\x02" && V9 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "P" || M3 == "p") && V16 != "P")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 != "H" || M3 != "h") || (M3 != "J" || M3 !="j") || (M3 != "P" || M3 != "p"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M2 == "I" || M2 =="i") && V9 == "I")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- //MOVE J TO I K
- if ((M2 == "J" || M2 == "j") && V10 != "J")
- {
- if ((M3 == "I" || M3 == "i") && V9 == "I")
- {
- if ( Val == "\x01" && V10 == "\x01")
- {
- V9 = "\x01";
- V10 = "J";
- Val = "\x02";
- goto Board;
- }
- if ( Val == "\x01" && V10 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V10 == "\x02")
- {
- V9 = "\x02";
- V10 = "J";
- Val = "\x01";
- goto Board;
- }
- if ( Val == "\x02" && V10 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "I" || M3 == "i") && V9 != "I")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 == "K" || M3 == "k") && V11 == "K")
- {
- if ( Val == "\x01" && V10 == "\x01")
- {
- V11 = "\x01";
- V10 = "J";
- Val = "\x02";
- goto Board;
- }
- if ( Val == "\x01" && V10 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V10 == "\x02")
- {
- V11 = "\x02";
- V10 = "J";
- Val = "\x01";
- goto Board;
- }
- if ( Val == "\x02" && V10 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "K" || M3 == "k") && V11 != "K")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 != "I" || M3 != "i") || (M3 != "K" || M3 !="k"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M2 == "J" || M2 =="j") && V10 == "J")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- //MOVE K TO j l b
- if ((M2 == "K" || M2 == "k") && V11 != "K")
- {
- if ((M3 == "L" || M3 == "l") && V12 == "L")
- {
- if ( Val == "\x01" && V11 == "\x01")
- {
- V12 = "\x01";
- V11 = "K";
- Val = "\x02";
- if (V12=="\x01" && V13 =="\x01" && V14 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x01" && V11 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V11 == "\x02")
- {
- V12 = "\x02";
- V11 = "K";
- Val = "\x01";
- if (V12=="\x02" && V13 =="\x02" && V14 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- if ( Val == "\x02" && V11 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "L" || M3 == "l") && V12 != "L")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 == "J" || M3 == "j") && V10 == "J")
- {
- if ( Val == "\x01" && V11 == "\x01")
- {
- V10 = "\x01";
- V11 = "K";
- Val = "\x02";
- if (V10=="\x01" && V9 =="\x01" && V16 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x01" && V11 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V11 == "\x02")
- {
- V10 = "\x02";
- V11 = "K";
- Val = "\x01";
- if (V10=="\x02" && V9 =="\x02" && V16 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- if ( Val == "\x02" && V11 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "J" || M3 == "j") && V10 != "J")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 == "B" || M3 == "b") && V2 == "B")
- {
- if ( Val == "\x01" && V11 == "\x01")
- {
- V2 = "\x01";
- V11 = "K";
- Val = "\x02";
- if (V1=="\x01" && V2 =="\x01" && V3 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x01" && V11 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V11 == "\x02")
- {
- V2 = "\x02";
- V11 = "K";
- Val = "\x01";
- if (V1=="\x02" && V2 =="\x02" && V3 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- if ( Val == "\x02" && V11 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "B" || M3 == "b") && V2 != "B")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 != "L" || M3 != "l") || (M3 != "J" || M3 !="j") || (M3 != "B" || M3 != "b"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M2 == "K" || M2 =="k") && V11 == "K")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- //MOVE L TO k m
- if ((M2 == "L" || M2 == "l") && V12 != "L")
- {
- if ((M3 == "M" || M3 == "m") && V13 == "M")
- {
- if ( Val == "\x01" && V12 == "\x01")
- {
- V13 = "\x01";
- V12 = "L";
- Val = "\x02";
- goto Board;
- }
- if ( Val == "\x01" && V12 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V12 == "\x02")
- {
- V13 = "\x02";
- V12 = "L";
- Val = "\x01";
- goto Board;
- }
- if ( Val == "\x02" && V12 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "M" || M3 == "m") && V13 != "M")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 == "K" || M3 == "k") && V11 == "K")
- {
- if ( Val == "\x01" && V12 == "\x01")
- {
- V11 = "\x01";
- V12 = "L";
- Val = "\x02";
- goto Board;
- }
- if ( Val == "\x01" && V12 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V12 == "\x02")
- {
- V11 = "\x02";
- V12 = "L";
- Val = "\x01";
- goto Board;
- }
- if ( Val == "\x02" && V12 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "K" || M3 == "k") && V11 != "K")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 != "M" || M3 != "m") || (M3 != "K" || M3 !="k"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M2 == "L" || M2 =="l") && V12 == "L")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- //MOVE M TO l d n
- if ((M2 == "M" || M2 == "m") && V13 != "M")
- {
- if ((M3 == "L" || M3 == "l") && V12 == "L")
- {
- if ( Val == "\x01" && V13 == "\x01")
- {
- V12 = "\x01";
- V13 = "M";
- Val = "\x02";
- if (V10=="\x01" && V11 =="\x01" && V12 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x01" && V13 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V13 == "\x02")
- {
- V12 = "\x02";
- V13 = "M";
- Val = "\x01";
- if (V10=="\x02" && V11 =="\x02" && V12 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- if ( Val == "\x02" && V13 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "L" || M3 == "l") && V12 != "L")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 == "D" || M3 == "d") && V4 == "D")
- {
- if ( Val == "\x01" && V13 == "\x01")
- {
- V4 = "\x01";
- V13 = "M";
- Val = "\x02";
- if (V3=="\x01" && V4 =="\x01" && V5 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x01" && V13 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V13 == "\x02")
- {
- V4 = "\x02";
- V13 = "M";
- Val = "\x01";
- if (V3=="\x02" && V4 =="\x02" && V5 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- if ( Val == "\x02" && V13 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "D" || M3 == "d") && V4 != "D")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 == "N" || M3 == "n") && V14 == "N")
- {
- if ( Val == "\x01" && V13 == "\x01")
- {
- V14 = "\x01";
- V13 = "M";
- Val = "\x02";
- if (V14=="\x01" && V15 =="\x01" && V16 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x01" && V13 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V13 == "\x02")
- {
- V14 = "\x02";
- V13 = "M";
- Val = "\x01";
- if (V14=="\x02" && V15 =="\x02" && V16 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- if ( Val == "\x02" && V13 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "N" || M3 == "n") && V14 != "N")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 != "L" || M3 != "l") || (M3 != "D" || M3 !="d") || (M3 != "N" || M3 != "n"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M2 == "M" || M2 =="m") && V13 == "M")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- //MOVE N TO m o
- if ((M2 == "N" || M2 == "n") && V14 != "N")
- {
- if ((M3 == "M" || M3 == "m") && V13 == "M")
- {
- if ( Val == "\x01" && V14 == "\x01")
- {
- V13 = "\x01";
- V14 = "N";
- Val = "\x02";
- goto Board;
- }
- if ( Val == "\x01" && V14 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V14 == "\x02")
- {
- V13 = "\x02";
- V14 = "N";
- Val = "\x01";
- goto Board;
- }
- if ( Val == "\x02" && V14 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "M" || M3 == "m") && V13 != "M")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 == "O" || M3 == "o") && V15 == "O")
- {
- if ( Val == "\x01" && V14 == "\x01")
- {
- V15 = "\x01";
- V14 = "N";
- Val = "\x02";
- goto Board;
- }
- if ( Val == "\x01" && V14 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V14 == "\x02")
- {
- V15 = "\x02";
- V14 = "N";
- Val = "\x01";
- goto Board;
- }
- if ( Val == "\x02" && V14 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "O" || M3 == "o") && V15 != "O")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 != "M" || M3 != "m") || (M3 != "O" || M3 !="o"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M2 == "N" || M2 =="n") && V14 == "N")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- //MOE O TO n f p
- if ((M2 == "O" || M2 == "o") && V15 != "O")
- {
- if ((M3 == "F" || M3 == "f") && V6 == "F")
- {
- if ( Val == "\x01" && V15 == "\x01")
- {
- V6 = "\x01";
- V15 = "O";
- Val = "\x02";
- if (V5=="\x01" && V6 =="\x01" && V7 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x01" && V15 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V15 == "\x02")
- {
- V6 = "\x02";
- V15 = "O";
- Val = "\x01";
- if (V5=="\x02" && V6 =="\x02" && V7 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- if ( Val == "\x02" && V15 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "F" || M3 == "f") && V6 != "F")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 == "P" || M3 == "p") && V16 == "P")
- {
- if ( Val == "\x01" && V15 == "\x01")
- {
- V16 = "\x01";
- V15 = "O";
- Val = "\x02";
- if (V10=="\x01" && V9 =="\x01" && V16 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x01" && V15 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V15 == "\x02")
- {
- V16 = "\x02";
- V15 = "O";
- Val = "\x01";
- if (V10=="\x02" && V9 =="\x02" && V16 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- if ( Val == "\x02" && V15 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "P" || M3 == "p") && V16 != "P")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 == "N" || M3 == "n") && V14 == "N")
- {
- if ( Val == "\x01" && V15 == "\x01")
- {
- V14 = "\x01";
- V15 = "O";
- Val = "\x02";
- if (V12=="\x01" && V13 =="\x01" && V14 =="\x01")
- {
- Mill = 1;
- }
- goto Board;
- }
- if ( Val == "\x01" && V15 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V15 == "\x02")
- {
- V14 = "\x02";
- V15 = "O";
- Val = "\x01";
- if (V12=="\x02" && V13 =="\x02" && V14 =="\x02")
- {
- Mi2 = 1;
- }
- goto Board;
- }
- if ( Val == "\x02" && V15 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "N" || M3 == "n") && V14 != "N")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 != "F" || M3 != "f") || (M3 != "P" || M3 !="p") || (M3 != "N" || M3 != "n"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M2 == "O" || M2 =="o") && V15 == "O")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- //MOVE P to o i
- if ((M2 == "P" || M2 == "p") && V16 != "P")
- {
- if ((M3 == "I" || M3 == "i") && V9 == "I")
- {
- if ( Val == "\x01" && V16 == "\x01")
- {
- V9 = "\x01";
- V16 = "P";
- Val = "\x02";
- goto Board;
- }
- if ( Val == "\x01" && V16 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V16 == "\x02")
- {
- V9 = "\x02";
- V16 = "P";
- Val = "\x01";
- goto Board;
- }
- if ( Val == "\x02" && V16 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "M" || M3 == "m") && V13 != "M")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 == "O" || M3 == "o") && V15 == "O")
- {
- if ( Val == "\x01" && V16 == "\x01")
- {
- V15 = "\x01";
- V16 = "P";
- Val = "\x02";
- goto Board;
- }
- if ( Val == "\x01" && V16 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ( Val == "\x02" && V16 == "\x02")
- {
- V15 = "\x02";
- V16 = "P";
- Val = "\x01";
- goto Board;
- }
- if ( Val == "\x02" && V16 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M3 == "O" || M3 == "o") && V15 != "O")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- if ((M3 != "I" || M3 != "i") || (M3 != "O" || M3 !="o"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if ((M2 == "P" || M2 =="p") && V16 == "P")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board;
- }
- }
- if (Num1 == 2) //Vs. Computer
- {
- int F1 = 0;
- int F2 = 0;
- int C = 0; // show what was captured
- int Chk = 0; //count for if nothing else randomizer
- system("cls");
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n"; //find who goes first
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " The computer is \x02.\n";
- cout << " To see who goes first: \n";
- cout << " ";
- system("pause");
- cout << " \n";
- srand((unsigned)time(0));//randomizer
- R1 = (rand()%2) +1; //1-2
- if (R1 == 1)
- {
- cout << " Player \x01 goes first. \n";
- Val = "\x01";
- F1 = 0;
- F2 = 0;
- }
- if (R1 >= 2)
- {
- cout << " The computer goes first. \n";
- Val = "\x02";
- F1 = 1;
- F2 = 1;
- }
- cout << " ";
- system("pause");
- Board2:
- if (N1 < 0)
- {
- N1 = 0;
- }
- if (N2 < 0)
- {
- N2 = 0;
- }
- system("cls");
- cout << " \n";
- cout << " \n";
- cout << " \x01 Six-Men's Morris \x02 \n";
- cout << " \n";
- cout << " b \n";
- cout << " \n";
- cout << " a "<<V1<<"\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4"<<V2<<"\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4"<<V3<<" c\n";
- cout << " \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3\n";
- cout << " \xb3 j "<<V10<<"\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4"<<V11<<"\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4"<<V12<<" l \xb3\n";
- cout << " \xb3 \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 k \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3 \xb3\n";
- cout << " h "<<V8<<"\xc4\xc4\xc4\xc4\xc4\xc4\xc4"<<V9<<" i m "<<V13<<"\xc4\xc4\xc4\xc4\xc4\xc4\xc4"<<V4<<" d \n";
- cout << " \xb3 \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 o \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3 \xb3\n";
- cout << " \xb3 p "<<V16<<"\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4"<<V15<<"\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4"<<V14<<" n \xb3\n";
- cout << " \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3\n";
- cout << " \xb3 \xb3 \xb3\n";
- cout << " g "<<V7<<"\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4"<<V6<<"\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4"<<V5<<" e\n";
- cout << " \n";
- cout << " f \n";
- cout << " \n";
- //Matching / Capture
- //ABC (8 MILLS)
- if (V1=="\x01" && V2 =="\x01" && V3 =="\x01" && Mill == 1) //put if match then mill = 1 wherever \xo1 at ABC
- {//Match ABC black pieces
- CB:
- cout << " You formed a mill, choose a piece to capture.\n";
- cout << " Capture the piece at spot: ";
- cin >> Cap;
- //Capture a white piece
- if (Cap == "A" || Cap == "a")
- {
- if (V1 == "\x02")
- {
- V1 = "A";
- goto VA1;
- }
- if (V1 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if (Cap == "B" || Cap == "b")
- {
- if (V2 == "\x02")
- {
- V2 = "B";
- goto VA1;
- }
- if (V2 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if (Cap == "C" || Cap == "c")
- {
- if (V3 == "\x02")
- {
- V3 = "C";
- goto VA1;
- }
- if (V3 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if (Cap == "D" || Cap == "d")
- {
- if (V4 == "\x02")
- {
- V4 = "D";
- goto VA1;
- }
- if (V4 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if (Cap == "E" || Cap == "e")
- {
- if (V5 == "\x02")
- {
- V5 = "E";
- goto VA1;
- }
- if (V5 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if (Cap == "F" || Cap == "f")
- {
- if (V6 == "\x02")
- {
- V6 = "F";
- goto VA1;
- }
- if (V6 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if (Cap == "G" || Cap == "g")
- {
- if (V7 == "\x02")
- {
- V7 = "G";
- goto VA1;
- }
- if (V7 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if (Cap == "H" || Cap == "h")
- {
- if (V8 == "\x02")
- {
- V8 = "H";
- goto VA1;
- }
- if (V8 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if (Cap == "I" || Cap == "i")
- {
- if (V9 == "\x02")
- {
- V9 = "I";
- goto VA1;
- }
- if (V9 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if (Cap == "J" || Cap == "j")
- {
- if (V10 == "\x02")
- {
- V10 = "J";
- goto VA1;
- }
- if (V10 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if (Cap == "K" || Cap == "k")
- {
- if (V11 == "\x02")
- {
- V11 = "K";
- goto VA1;
- }
- if (V11 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if (Cap == "L" || Cap == "l")
- {
- if (V12 == "\x02")
- {
- V12 = "L";
- goto VA1;
- }
- if (V12 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if (Cap == "M" || Cap == "m")
- {
- if (V13 == "\x02")
- {
- V13 = "M";
- goto VA1;
- }
- if (V13 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if (Cap == "N" || Cap == "n")
- {
- if (V14 == "\x02")
- {
- V14 = "N";
- goto VA1;
- }
- if (V14 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if (Cap == "O" || Cap == "o")
- {
- if (V15 == "\x02")
- {
- V15 = "O";
- goto VA1;
- }
- if (V15 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if (Cap == "P" || Cap == "p")
- {
- if (V16 == "\x02")
- {
- V16 = "P";
- goto VA1;
- }
- if (V16 != "\x02")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- VA1:
- Ct2 = Ct2 - 1; //lost a piece
- Mill = 0;
- goto Board2;
- }
- //AHG
- if (V1=="\x01" && V8 =="\x01" && V7 =="\x01" && Mill == 1)
- {//Match AHG black pieces
- goto CB;
- }
- //CDE
- if (V3=="\x01" && V4 =="\x01" && V5 =="\x01" && Mill == 1)
- {//Match CDE black pieces
- goto CB;
- }
- //EFG
- if (V5=="\x01" && V6 =="\x01" && V7 =="\x01" && Mill == 1)
- {//Match EFG black pieces
- goto CB;
- }
- //JKL
- if (V10=="\x01" && V11 =="\x01" && V12 =="\x01" && Mill == 1)
- {//Match JKL black pieces
- goto CB;
- }
- //LMN
- if (V12=="\x01" && V13 =="\x01" && V14 =="\x01" && Mill == 1)
- {//Match LMN black pieces
- goto CB;
- }
- //NOP
- if (V14=="\x01" && V15 =="\x01" && V16 =="\x01" && Mill == 1)
- {//Match NOP black pieces
- goto CB;
- }
- //JIP
- if (V10=="\x01" && V9 =="\x01" && V16 =="\x01" && Mill == 1)
- {//Match JIP black pieces
- goto CB;
- }
- //COMPUTER MATCH/CAPTURE CODE //if mill take a piece/ if close to mill take piece ELSE randomizer
- //Capture a black piece (8 MILLS)
- if (V1=="\x02" && V2 =="\x02" && V3 =="\x02" && Mi2 == 1) //ABC
- {//Match ABC white pieces
- ABC:
- C = 1;
- cout << " Computer formed a mill. The computer is thinking.";
- //if placing pieces take from 2 pair
- if (N1 > 0) //still placing pieces
- {
- if (V1 == "\x01" && V2 == "\x01" && V3 == "C") //AB
- {
- V1 = "A";
- Took = "A";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V2 == "\x01" && V3 == "\x01" && V1 == "A") //BC
- {
- V2 = "B";
- Took = "B";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V1 == "\x01" && V3 == "\x01" && V2 == "B") //AC
- {
- V3 = "C";
- Took = "C";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V3 == "\x01" && V4 == "\x01" && V5 == "E") //CD
- {
- V3 = "C";
- Took = "C";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V4 == "\x01" && V5 == "\x01" && V3 == "C") //DE
- {
- V4 = "D";
- Took = "D";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V3 == "\x01" && V5 == "\x01" && V4 == "D") //CE
- {
- V5 = "E";
- Took = "E";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V1 == "\x01" && V8 == "\x01" && V7 == "G") //AH
- {
- V1 = "A";
- Took = "A";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V8 == "\x01" && V7 == "\x01" && V1 == "A") //HG
- {
- V8 = "H";
- Took = "H";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V1 == "\x01" && V7 == "\x01" && V8 == "H") //AG
- {
- V7 = "G";
- Took = "G";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V5 == "\x01" && V6 == "\x01" && V7 == "G") //EF
- {
- V5 = "E";
- Took = "E";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V6 == "\x01" && V7 == "\x01" && V5 == "E") //FG
- {
- V6 = "F";
- Took = "F";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V5 == "\x01" && V7 == "\x01" && V6 == "F") //EG
- {
- V7 = "G";
- Took = "G";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 == "\x01" && V11 == "\x01" && V12 == "L") //JK
- {
- V10 = "J";
- Took = "J";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V11 == "\x01" && V12 == "\x01" && V10 == "J") //KL
- {
- V11 = "K";
- Took = "K";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 == "\x01" && V12 == "\x01" && V11 == "K") //JL
- {
- V12 = "L";
- Took = "L";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 == "\x01" && V9 == "\x01" && V16 == "P") //JI
- {
- V10 = "J";
- Took = "J";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V16 == "\x01" && V9 == "\x01" && V10 == "J") //IP
- {
- V9 = "I";
- Took = "I";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 == "\x01" && V16 == "\x01" && V9 == "I") //JP
- {
- V16 = "P";
- Took = "P";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V12 == "\x01" && V13 == "\x01" && V14 == "N") //LM
- {
- V12 = "L";
- Took = "L";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V13 == "\x01" && V14 == "\x01" && V12 == "L") //MN
- {
- V13 = "M";
- Took = "M";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V14 == "\x01" && V12 == "\x01" && V13 == "M") //LN
- {
- V14 = "N";
- Took = "N";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V14 == "\x01" && V15 == "\x01" && V16 == "P") //NO
- {
- V14 = "N";
- Took = "N";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V15 == "\x01" && V16 == "\x01" && V14 == "N") //OP
- {
- V15 = "O";
- Took = "O";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V14 == "\x01" && V16 == "\x01" && V15 == "O") //NP
- {
- V16 = "P";
- Took = "P";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- }
- //take from mill
- if (V1 == "\x01" && V2 == "\x01" && V3 == "\x01") // ABC - 123
- {
- int Cp1;
- srand((unsigned)time(0));//randomizer
- Cp1 = (rand()%3) +1; //1-3
- if (Cp1 == 1) //A
- {
- V1 = "A";
- Took = "A";
- }
- if (Cp1 == 2) //B
- {
- V2 = "B";
- Took = "B";
- }
- if (Cp1 >= 3) //C
- {
- V3 = "C";
- Took = "C";
- }
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V1 == "\x01" && V8 == "\x01" && V7 == "\x01") // AHG - 187
- {
- int Cp;
- srand((unsigned)time(0));//randomizer
- Cp = (rand()%3) +1; //1-3
- if (Cp == 1) //A
- {
- V1 = "A";
- Took = "A";
- }
- if (Cp == 2) //H
- {
- V8 = "H";
- Took = "H";
- }
- if (Cp >= 3) //G
- {
- V7 = "G";
- Took = "G";
- }
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V3 == "\x01" && V4 == "\x01" && V5 == "\x01") //CDE - 345
- {
- int CP2;
- srand((unsigned)time(0));//randomizer
- CP2 = (rand()%3) +1; //1-3
- if (CP2 == 1) //C
- {
- V3 = "C";
- Took = "C";
- }
- if (CP2 == 2) //D
- {
- V4 = "D";
- Took = "D";
- }
- if (CP2 >= 3) //E
- {
- V5 = "E";
- Took = "E";
- }
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V5 == "\x01" && V6 == "\x01" && V7 == "\x01")//EFG-567
- {
- int C1;
- srand((unsigned)time(0));//randomizer
- C1 = (rand()%3) +1; //1-3
- if (C1 == 1) //E
- {
- V5 = "E";
- Took = "E";
- }
- if (C1 == 2) //F
- {
- V6 = "F";
- Took = "F";
- }
- if (C1 >= 3) //G
- {
- V7 = "G";
- Took = "G";
- }
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 == "\x01" && V11 == "\x01" && V12 == "\x01")//JKL 10-11-12
- {
- int C2;
- srand((unsigned)time(0));//randomizer
- C2 = (rand()%3) +1; //1-3
- if (C2 == 1) //J
- {
- V10 = "J";
- Took = "J";
- }
- if (C2 == 2) //K
- {
- V11 = "K";
- Took = "K";
- }
- if (C2 >= 3) //L
- {
- V12 = "L";
- Took = "L";
- }
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V12 == "\x01" && V13 == "\x01" && V14 == "\x01")//LMN 12-13-14
- {
- int C3;
- srand((unsigned)time(0));//randomizer
- C3 = (rand()%3) +1; //1-3
- if (C3 == 1) //L
- {
- V12 = "L";
- Took = "L";
- }
- if (C3 == 2) //M
- {
- V13 = "M";
- Took = "M";
- }
- if (C3 >= 3) //N
- {
- V14 = "N";
- Took = "N";
- }
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V15 == "\x01" && V16 == "\x01" && V14 == "\x01")//NOP 14-15-16
- {
- int C4;
- srand((unsigned)time(0));//randomizer
- C4 = (rand()%3) +1; //1-3
- if (C4 == 1) //N
- {
- V14 = "N";
- Took = "N";
- }
- if (C4 == 2) //O
- {
- V15 = "O";
- Took = "O";
- }
- if (C4 >= 3) //P
- {
- V16 = "P";
- Took = "P";
- }
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 == "\x01" && V16 == "\x01" && V9 == "\x01")//JIP 10-9-16
- {
- int C5;
- srand((unsigned)time(0));//randomizer
- C5 = (rand()%3) +1; //1-3
- if (C5 == 1) //J
- {
- V10 = "J";
- Took = "J";
- }
- if (C5 == 2) //I
- {
- V9 = "I";
- Took = "I";
- }
- if (C5 >= 3) //P
- {
- V16 = "P";
- Took = "P";
- }
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- //Block Mills that are close to being made
- if (V1 == "\x01" && V2 == "\x01" && V4 == "\x01" && V3 == "C") //AB D
- {
- V4 = "D";
- Took = "D";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V1 == "\x01" && V3 == "\x01" && V11 == "\x01" && V2 == "B") //AC K
- {
- V11 = "K";
- Took = "K";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V2 == "\x01" && V3 == "\x01" && V8 == "\x01" && V1 == "A") //BC H
- {
- V8 = "H";
- Took = "H";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V1 == "\x01" && V8 == "\x01" && V6 == "\x01" && V7 == "G") //AH F
- {
- V6 = "F";
- Took = "F";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V1 == "\x01" && V7 == "\x01" && V9 == "\x01" && V8 == "H") //AG I
- {
- V9 = "I";
- Took = "I";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V8 == "\x01" && V7 == "\x01" && V2 == "\x01" && V1 == "A") //HG B
- {
- V2 = "B";
- Took = "B";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V3 == "\x01" && V4 == "\x01" && V6 == "\x01" && V5 == "E") //CD F
- {
- V6 = "F";
- Took = "F";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V3 == "\x01" && V5 == "\x01" && V13 == "\x01" && V4 == "D") //CE M
- {
- V13 = "M";
- Took = "M";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V4 == "\x01" && V5 == "\x01" && V2 == "\x01" && V3 == "C") //DE B
- {
- V2 = "B";
- Took = "B";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V5 == "\x01" && V6 == "\x01" && V8 == "\x01" && V7 == "G") //EF H
- {
- V8 = "H";
- Took = "H";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V7 == "\x01" && V5 == "\x01" && V15 == "\x01" && V6 == "F") //EG O
- {
- V15 = "O";
- Took = "O";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V7 == "\x01" && V6 == "\x01" && V4 == "\x01" && V5 == "E") //GF D
- {
- V4 = "D";
- Took = "D";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 == "\x01" && V11 == "\x01" && V13 == "\x01" && V12 == "L") //JK M
- {
- V13 = "M";
- Took = "M";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 == "\x01" && V12 == "\x01" && V2 == "\x01" && V11 == "K") //JL B
- {
- V2 = "B";
- Took = "B";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V12 == "\x01" && V11 == "\x01" && V9 == "\x01" && V10 == "J") //LK I
- {
- V9 = "I";
- Took = "I";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V12 == "\x01" && V13 == "\x01" && V15 == "\x01" && V14 == "N") //LM O
- {
- V15 = "O";
- Took = "O";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V13 == "\x01" && V14 == "\x01" && V11 == "\x01" && V12 == "L") //MN K
- {
- V11 = "K";
- Took = "K";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V12 == "\x01" && V14 == "\x01" && V4 == "\x01" && V13 == "M") //LN D
- {
- V4 = "D";
- Took = "D";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V15 == "\x01" && V14 == "\x01" && V9 == "\x01" && V16 == "P") //NO I
- {
- V9 = "I";
- Took = "I";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V14 == "\x01" && V16 == "\x01" && V6 == "\x01" && V15 == "O") //NP F
- {
- V6 = "F";
- Took = "F";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V15 == "\x01" && V16 == "\x01" && V13 == "\x01" && V14 == "N") //OP M
- {
- V13 = "M";
- Took = "M";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 == "\x01" && V9 == "\x01" && V15 == "\x01" && V16 == "P") //JI O
- {
- V15 = "O";
- Took = "O";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 == "\x01" && V16 == "\x01" && V8 == "\x01" && V9 == "I") //JP H
- {
- V8 = "H";
- Took = "H";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V9 == "\x01" && V16 == "\x01" && V11 == "\x01" && V10 == "J") //IP K
- {
- V11 = "K";
- Took = "K";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- //Randomizer
- int Cap;
- CAP:
- srand((unsigned)time(0));//randomizer
- Cap = (rand()%16) +1; //1-16
- if (Cap == 1)
- {
- if (V1 == "\x01")
- {
- V1 = "A";
- Took = "A";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V1 != "\x01")
- {
- goto CAP;
- }
- }
- if (Cap == 2)
- {
- if (V2 == "\x01")
- {
- V2 = "B";
- Took = "B";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V2 != "\x01")
- {
- goto CAP;
- }
- }
- if (Cap == 3)
- {
- if (V3 == "\x01")
- {
- V3 = "C";
- Took = "C";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V3 != "\x01")
- {
- goto CAP;
- }
- }
- if (Cap == 4)
- {
- if (V4 == "\x01")
- {
- V4 = "D";
- Took = "D";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V4 != "\x01")
- {
- goto CAP;
- }
- }
- if (Cap == 5)
- {
- if (V5 == "\x01")
- {
- V5 = "E";
- Took = "E";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V5 != "\x01")
- {
- goto CAP;
- }
- }
- if (Cap == 6)
- {
- if (V6 == "\x01")
- {
- V6 = "F";
- Took = "F";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V6 != "\x01")
- {
- goto CAP;
- }
- }
- if (Cap == 7)
- {
- if (V7 == "\x01")
- {
- V7 = "G";
- Took = "G";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V7 != "\x01")
- {
- goto CAP;
- }
- }
- if (Cap == 8)
- {
- if (V8 == "\x01")
- {
- V8 = "H";
- Took = "H";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V8 != "\x01")
- {
- goto CAP;
- }
- }
- if (Cap == 9)
- {
- if (V9 == "\x01")
- {
- V9 = "I";
- Took = "I";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V9 != "\x01")
- {
- goto CAP;
- }
- }
- if (Cap == 10)
- {
- if (V10 == "\x01")
- {
- V10 = "J";
- Took = "J";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 != "\x01")
- {
- goto CAP;
- }
- }
- if (Cap == 11)
- {
- if (V11 == "\x01")
- {
- V11 = "K";
- Took = "K";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V11 != "\x01")
- {
- goto CAP;
- }
- }
- if (Cap == 12)
- {
- if (V12 == "\x01")
- {
- V12 = "L";
- Took = "L";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V12 != "\x01")
- {
- goto CAP;
- }
- }
- if (Cap == 13)
- {
- if (V13 == "\x01")
- {
- V13 = "M";
- Took = "M";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V13 != "\x01")
- {
- goto CAP;
- }
- }
- if (Cap == 14)
- {
- if (V14 == "\x01")
- {
- V14 = "N";
- Took = "N";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V14 != "\x01")
- {
- goto CAP;
- }
- }
- if (Cap == 15)
- {
- if (V15 == "\x01")
- {
- V15 = "O";
- Took = "O";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V15 != "\x01")
- {
- goto CAP;
- }
- }
- if (Cap == 16)
- {
- if (V16 == "\x01")
- {
- V16 = "P";
- Took = "P";
- Ct1 = Ct1 - 1; //lost a piece
- Mi2 = 0;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V16 != "\x01")
- {
- goto CAP;
- }
- }
- goto CAP;
- }
- if (V3=="\x02" && V4 =="\x02" && V5 =="\x02" && Mi2 == 1) //CDE - 345
- {//Match CDE white pieces
- goto ABC; //USE ABC CAP CODE FOR ALL CAPTURE CODE
- }
- if (V1=="\x02" && V8 =="\x02" && V7 =="\x02" && Mi2 == 1) //AHG 187
- {//Match AHG white pieces
- goto ABC; //goto capture code
- }
- if (V5=="\x02" && V6 =="\x02" && V7 =="\x02" && Mi2 == 1) //EFG 567
- {//Match EFG white pieces
- goto ABC; //goto capture code
- }
- if (V10 =="\x02" && V11 =="\x02" && V12 =="\x02" && Mi2 == 1) //JKL 10 11 12
- {//Match JKL white pieces
- goto ABC; //goto capture code
- }
- if (V10=="\x02" && V9 =="\x02" && V16 =="\x02" && Mi2 == 1) //JIP 9 10 16
- {//Match JIP white pieces
- goto ABC; //goto capture code
- }
- if (V12=="\x02" && V13 =="\x02" && V14 =="\x02" && Mi2 == 1) //LMN 12 13 14
- {//Match LMN white pieces
- goto ABC; //goto capture code
- }
- if (V14=="\x02" && V15 =="\x02" && V16 =="\x02" && Mi2 == 1) //NOP 14 15 16
- {//Match NOP white pieces
- goto ABC; //goto capture code
- }
- //if < 3 pieces left then win
- if (Ct1 < 3)
- {
- system("cls"); //winning smiley face
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \x02\x02\x02\x02\x02\x02\x02\x02\x02\x02 \n";
- cout << " \x02 \x02 \n";
- cout << " \x02 \x02 \x02 \x02 \n";
- cout << " \x02 \x02\x02\x02 \x02\x02\x02 \x02 \n";
- cout << " \x02 \x02 \x02 \x02 \n";
- cout << " \x02 \x02 \n";
- cout << " \x02 \x02 \x02 \x02 \n";
- cout << " \x02 \x02 \x02 \x02 \n";
- cout << " \x02 \x02\x02\x02\x02\x02\x02 \x02 \n";
- cout << " \x02 \x02 \n";
- cout << " \x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\n";
- cout << " \n";
- cout << " Computer wins. \n";
- cout << " Do you want to play again? \n";
- cout << " 1) Yes \n"; //play again
- cout << " 2) No \n";
- cout << " Make a selection: ";
- cin >> Ans;
- if (Ans == 1)
- {
- system("cls");
- goto Top;
- }
- if (Ans >= 2)
- {
- system("cls");
- return 0;
- }
- }
- if (Ct2 < 3)
- {
- system("cls"); //winning smiley face
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \n";
- cout << " \x01\x01\x01\x01\x01\x01\x01\x01\x01\x01 \n";
- cout << " \x01 \x01 \n";
- cout << " \x01 \x01 \x01 \x01 \n";
- cout << " \x01 \x01\x01\x01 \x01\x01\x01 \x01 \n";
- cout << " \x01 \x01 \x01 \x01 \n";
- cout << " \x01 \x01 \n";
- cout << " \x01 \x01 \x01 \x01 \n";
- cout << " \x01 \x01 \x01 \x01 \n";
- cout << " \x01 \x01\x01\x01\x01\x01\x01 \x01 \n";
- cout << " \x01 \x01 \n";
- cout << " \x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\n";
- cout << " \n";
- cout << " Player \x01 wins. \n";
- cout << " Do you want to play again? \n";
- cout << " 1) Yes \n"; //play again
- cout << " 2) No \n";
- cout << " Make a selection: ";
- cin >> Ans;
- if (Ans == 1)
- {
- system("cls");
- goto Top;
- }
- if (Ans >= 2)
- {
- system("cls");
- return 0;
- }
- }
- //MOVE BOARD
- if (Mill < 1 && Mi2 < 1)
- {
- if (N1 <= 0 && N2 <=0)
- {
- cout << " \xc9\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcb\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xbb\n";
- cout << " \xba Moving: \xba Pieces Left: \xba \n";
- cout << " \xba \xba \x01 " <<Ct1<<" \xba\n";
- cout << " \xba "<<Val<<" \xba \xba\n";
- cout << " \xba \xba \x02 " <<Ct2<<" \xba\n";
- cout << " \xc8\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xca\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xbc\n";
- cout << " \n";
- }
- if (N1 > 0 || N2 >0)
- {
- cout << " \xc9\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcb\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcb\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xbb\n";
- cout << " \xba Moving: \xba Pieces Left: \xba Pieces Left to Place: \xba \n";
- cout << " \xba \xba \x01 " <<Ct1<<" \xba \x01 " <<N1<<" \xba\n";
- cout << " \xba "<<Val<<" \xba \xba \xba\n";
- cout << " \xba \xba \x02 " <<Ct2<<" \xba \x02 " <<N2<<" \xba\n";
- cout << " \xc8\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xca\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xca\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xbc\n";
- cout << " \n";
- }
- }
- if (N1 <= 0 && Val == "\x01" && Mill < 1 && Mi2 < 1) //MOVE PIECES
- {
- Chk = 0;
- if (F2 == 1)
- {
- cout << " Computer moved from " << S << " to " << S2 << ".\n";
- }
- if (F2 == 0)
- {
- cout << " Computer placed a piece at " << Spot << ".\n";
- }
- if (C == 0)
- {
- cout << endl;
- }
- if (C == 1)
- {
- cout << " Computer captured a piece at " << Took << ".\n\n";
- C = 0;
- }
- Dir = "Move a piece from: ";
- cout << " "<<Dir<<" ";
- cin >> M2;
- D2 = "to: ";
- cout << " "<<D2<<" ";
- cin >> M3;
- cout << " \n";
- }
- if (N2 <= 0 && Val == "\x02" && Mill < 1 && Mi2 < 1) //computer moves pieces
- {
- Chk = 0;
- F2 = 1;
- cout << " Computer is thinking. ";
- CTop:
- //COMPUTER MOVE //Capture, set capture, block, else RANDOMIZER
- //CAPTURE Mills -make mill
- if (V1 == "\x02" && V2 == "\x02" && V3 == "C" && V4 == "\x02") //ABC - 123
- {//AB
- V4 = "D";
- S = "D";
- V3 = "\x02";
- S2 = "C";
- Val = "\x01";
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V2 == "\x02" && V3 == "\x02" && V1 == "A" && V8 == "\x02")
- {//BC
- V8 = "H";
- S = "H";
- V1 = "\x02";
- S2 = "A";
- Val = "\x01";
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V1 == "\x02" && V3 == "\x02" && V2 == "B" && V11 == "\x02")
- {//AC
- V11 = "K";
- S = "K";
- V2 = "\x02";
- S2 = "B";
- Val = "\x01";
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V3 == "\x02" && V4 == "\x02" && V5 == "E" && V6 == "\x02")//CDE - 345
- {//CD
- V6 = "F";
- S = "F";
- V5 = "\x02";
- S2 = "E";
- Val = "\x01";
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V4 == "\x02" && V5 == "\x02" && V3 == "C" && V2 == "\x02")
- {//DE
- V2 = "B";
- S = "B";
- V3 = "\x02";
- S2 = "C";
- Val = "\x01";
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V3 == "\x02" && V5 == "\x02" && V4 == "D" && V13 == "\x02")
- {//CE
- V13 ="M";
- S = "M";
- V4 = "\x02";
- S2 = "D";
- Val = "\x01";
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V5 == "\x02" && V6 == "\x02" && V7 == "G" && V8 == "\x02") //EFG - 567
- {//EF
- V8 = "H";
- S = "H";
- V7 = "\x02";
- S2 = "G";
- Val = "\x01";
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V6 == "\x02" && V7 == "\x02" && V5 == "E" && V4 == "\x02")
- {//FG
- V4 = "D";
- S = "D";
- V5 = "\x02";
- S2 = "E";
- Val = "\x01";
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V5 == "\x02" && V7 == "\x02" && V6 == "F" && V15 == "\x02")
- {//EG
- V15 = "O";
- S = "O";
- V6 = "\x02";
- S2 = "F";
- Val = "\x01";
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V1 == "\x02" && V8 == "\x02" && V7 == "G" && V6 == "\x02") //AHG - 187
- {//AH
- V6 = "F";
- S = "F";
- V7 = "\x02";
- S2 = "G";
- Val = "\x01";
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V7 == "\x02" && V8 == "\x02" && V1 == "A" && V2 == "\x02")
- {//HG
- V2 = "B";
- S = "B";
- V1 = "\x02";
- S2 = "A";
- Val = "\x01";
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V1 == "\x02" && V7 == "\x02" && V8 == "H" && V9 == "\x02")
- {//AG
- V9 = "I";
- S = "I";
- V8 = "\x02";
- S2 = "H";
- Val = "\x01";
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- //INNER BOARD MILLS
- if (V10 == "\x02" && V9 == "\x02" && V16 == "P" && V15 == "\x02") //JIP 10-9-16
- {//JI
- V15 = "O";
- S = "O";
- V16 = "\x02";
- S2 = "P";
- Val = "\x01";
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V9 == "\x02" && V16 == "\x02" && V10 == "J" && V11 =="\x02")
- {//IP
- V11 = "K";
- S = "K";
- V10 = "\x02";
- S2 = "J";
- Val = "\x01";
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 == "\x02" && V16 == "\x02" && V9 == "I" && V8 == "\x02")
- {//JP
- V8 = "H";
- S = "H";
- V9 = "\x02";
- S2 = "I";
- Val = "\x01";
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 == "\x02" && V11 == "\x02" && V12 == "L" && V13 == "\x02") //JKL 10-11-12
- {//JK
- V13 = "M";
- S = "M";
- V12 = "\x02";
- S2 = "L";
- Val = "\x01";
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V11 == "\x02" && V12 == "\x02" && V10 == "J" && V9 == "\x02")
- {//KL
- V9 = "I";
- S = "I";
- V10 = "\x02";
- S2 = "J";
- Val = "\x01";
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 == "\x02" && V12 == "\x02" && V11 == "K" && V2 == "\x02")
- {//JL
- V2 = "B";
- S = "B";
- V11 = "\x02";
- S2 = "K";
- Val = "\x01";
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V12 == "\x02" && V13 == "\x02" && V14 == "N" && V15 == "\x02") //LMN 12-13-14
- {//LM
- V15 = "O";
- S = "O";
- V14 = "\x02";
- S2 = "N";
- Val = "\x01";
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V13 == "\x02" && V14 == "\x02" && V12 == "L" && V11 == "\x02")
- {//MN
- V11 = "K";
- S = "K";
- V12 = "\x02";
- S2 = "L";
- Val = "\x01";
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V12 == "\x02" && V14 == "\x02" && V13 == "M" && V4 == "\x02")
- {//LN
- V4 = "D";
- S = "D";
- V13 = "\x02";
- S2 = "M";
- Val = "\x01";
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V14 == "\x02" && V15 == "\x02" && V16 == "P" && V9 == "\x02") //NOP 14-15-16
- {//NO
- V9 = "I";
- S = "I";
- V16 = "\x02";
- S2 = "P";
- Val = "\x01";
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V15 == "\x02" && V16 == "\x02" && V14 == "N" && V13 == "\x02")
- {//OP
- V13 = "M";
- S = "M";
- V14 = "\x02";
- S2 = "N";
- Val = "\x01";
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V14 == "\x02" && V16 == "\x02" && V15 == "O" && V6 == "\x02")
- {//NP
- V6 = "F";
- S = "F";
- V15 = "\x02";
- S2 = "O";
- Val = "\x01";
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- //if mill is already made take one out to set up make mill code
- if (V1 == "\x02" && V2 == "\x02" && V3 == "\x02") //ABC 123
- {
- int M1; //if none of above
- MIL1:
- srand((unsigned)time(0));//randomizer
- M1 = (rand()%3) +1; //1-3
- if (M1 == 1) //A to H
- {
- if (V8 == "H")
- {
- V1 = "A";
- S = "A";
- V8 = "\x02";
- S2 = "H";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto MIL1;
- }
- }
- if (M1 == 2) //B to K
- {
- if (V11 == "K")
- {
- V2 = "B";
- S = "B";
- V11 = "\x02";
- S2 = "K";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto MIL1;
- }
- }
- if (M1 == 3) //C to D
- {
- if (V4 == "D")
- {
- V3 = "C";
- S = "C";
- V4 = "\x02";
- S2 = "D";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto MIL1;
- }
- }
- }
- if (V1 == "\x02" && V8 == "\x02" && V7 == "\x02") //AHG 187
- {
- int M2; //if none of above
- MIL2:
- srand((unsigned)time(0));//randomizer
- M2 = (rand()%3) +1; //1-3
- if (M2 == 1) //A to B
- {
- if (V2 == "B")
- {
- V1 = "A";
- S = "A";
- V2 = "\x02";
- S2 = "B";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto MIL2;
- }
- }
- if (M2 == 2) //H to I
- {
- if (V9 == "I")
- {
- V8 = "H";
- S = "H";
- V9 = "\x02";
- S2 = "I";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto MIL2;
- }
- }
- if (M2 == 3) //G to F
- {
- if (V6 == "F")
- {
- V7 = "G";
- S = "G";
- V6 = "\x02";
- S2 = "F";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto MIL2;
- }
- }
- }
- if (V3 == "\x02" && V4 == "\x02" && V5 == "\x02") //CDE 345
- {
- int M3; //if none of above
- MIL3:
- srand((unsigned)time(0));//randomizer
- M3 = (rand()%3) +1; //1-3
- if (M3 == 1) //C to B
- {
- if (V2 == "B")
- {
- V3 = "C";
- S = "C";
- V2 = "\x02";
- S2 = "B";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto MIL3;
- }
- }
- if (M3 == 2) //D to M
- {
- if (V13 == "M")
- {
- V4 = "D";
- S = "D";
- V13 = "\x02";
- S2 = "M";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto MIL3;
- }
- }
- if (M3 == 3) //E to F
- {
- if (V6 == "F")
- {
- V5 = "C";
- S = "E";
- V6 = "\x02";
- S2 = "F";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto MIL3;
- }
- }
- }
- //EFG 567
- if (V5 == "\x02" && V6 == "\x02" && V7 == "\x02") //EFG 567
- {
- int M4; //if none of above
- MIL4:
- srand((unsigned)time(0));//randomizer
- M4 = (rand()%3) +1; //1-3
- if (M4 == 1) //E to D
- {
- if (V4 == "D")
- {
- V5 = "E";
- S = "E";
- V4 = "\x02";
- S2 = "D";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto MIL4;
- }
- }
- if (M4 == 2) //F to O
- {
- if (V15 == "O")
- {
- V6 = "F";
- S = "F";
- V15 = "\x02";
- S2 = "O";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto MIL4;
- }
- }
- if (M4 == 3) //G to H
- {
- if (V8 == "H")
- {
- V7 = "G";
- S = "G";
- V8 = "\x02";
- S2 = "H";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto MIL4;
- }
- }
- }
- if (V1 == "\x02" && V2 == "\x02" && V3 == "\x02") //JIP 10 9 16
- {
- int M5; //if none of above
- MIL5:
- srand((unsigned)time(0));//randomizer
- M5 = (rand()%3) +1; //1-3
- if (M5 == 1) //J to K 11
- {
- if (V11 == "K")
- {
- V10 = "J";
- S = "J";
- V11 = "\x02";
- S2 = "K";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto MIL5;
- }
- }
- if (M5 == 2) //I to H
- {
- if (V8 == "H")
- {
- V9 = "I";
- S = "I";
- V8 = "\x02";
- S2 = "H";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto MIL5;
- }
- }
- if (M5 == 3) //P to O
- {
- if (V15 == "O")
- {
- V16 = "P";
- S = "P";
- V15 = "\x02";
- S2 = "O";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto MIL5;
- }
- }
- }
- if (V10 == "\x02" && V11 == "\x02" && V12 == "\x02") //JKL 10 11 12
- {
- int M6; //if none of above
- MIL6:
- srand((unsigned)time(0));//randomizer
- M6 = (rand()%3) +1; //1-3
- if (M6 == 1) //J to I
- {
- if (V9 == "I")
- {
- V10 = "J";
- S = "J";
- V9 = "\x02";
- S2 = "I";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto MIL6;
- }
- }
- if (M6 == 2) //K to B
- {
- if (V2 == "B")
- {
- V11 = "K";
- S = "K";
- V2 = "\x02";
- S2 = "B";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto MIL6;
- }
- }
- if (M6 == 3) //L to M
- {
- if (V13 == "M")
- {
- V12 = "L";
- S = "L";
- V13 = "\x02";
- S2 = "M";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto MIL6;
- }
- }
- }
- if (V12 == "\x02" && V13 == "\x02" && V14 == "\x02") //LMN 12 13 14
- {
- int M7; //if none of above
- MIL7:
- srand((unsigned)time(0));//randomizer
- M7 = (rand()%3) +1; //1-3
- if (M7 == 1) //L to K
- {
- if (V11 == "K")
- {
- V12 = "L";
- S = "L";
- V11 = "\x02";
- S2 = "K";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto MIL7;
- }
- }
- if (M7 == 2) //M to D
- {
- if (V4 == "D")
- {
- V13 = "M";
- S = "M";
- V4 = "\x02";
- S2 = "D";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto MIL7;
- }
- }
- if (M7 == 3) //N to O
- {
- if (V15 == "O")
- {
- V14 = "N";
- S = "N";
- V15 = "\x02";
- S2 = "O";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto MIL7;
- }
- }
- }
- if (V14 == "\x02" && V15 == "\x02" && V16 == "\x02") //NOP 14 15 16
- {
- int M8; //if none of above
- MIL8:
- srand((unsigned)time(0));//randomizer
- M8 = (rand()%3) +1; //1-3
- if (M8 == 1) //N to M
- {
- if (V13 == "M")
- {
- V14 = "N";
- S = "N";
- V13 = "\x02";
- S2 = "M";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto MIL8;
- }
- }
- if (M8 == 2) //O to F
- {
- if (V6 == "F")
- {
- V15 = "O";
- S = "O";
- V6 = "\x02";
- S2 = "F";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto MIL8;
- }
- }
- if (M8 == 3) //P to I
- {
- if (V9 == "I")
- {
- V16 = "P";
- S = "P";
- V9 = "\x02";
- S2 = "I";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto MIL8;
- }
- }
- }
- //set up to make mill ABK LND MND -etc... (16 statements)
- if (V1 == "\x02" && V2 == "\x02" && V11 == "\x02" && V3 =="C") //ABK
- {
- V2 = "B";
- S = "B";
- V3 = "\x02";
- S2 = "C";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V3 == "\x02" && V2 == "\x02" && V11 == "\x02" && V1 =="A") //CBK
- {
- V2 = "B";
- S = "B";
- V1 = "\x02";
- S2 = "A";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V3 == "\x02" && V4 == "\x02" && V13 == "\x02" && V5 =="E") //CDM
- {
- V4 = "D";
- S = "D";
- V5 = "\x02";
- S2 = "E";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V5 == "\x02" && V4 == "\x02" && V13 == "\x02" && V3 =="C") //EDM
- {
- V4 = "D";
- S = "D";
- V3 = "\x02";
- S2 = "C";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V5 == "\x02" && V6 == "\x02" && V15 == "\x02" && V7 =="G") //EFO
- {
- V6 = "F";
- S = "F";
- V7 = "\x02";
- S2 = "G";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V7 == "\x02" && V6 == "\x02" && V15 == "\x02" && V5 =="E") //GFO
- {
- V6 = "F";
- S = "F";
- V5 = "\x02";
- S2 = "E";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V1 == "\x02" && V8 == "\x02" && V9 == "\x02" && V7 =="G") //AHI
- {
- V8 = "H";
- S = "H";
- V7 = "\x02";
- S2 = "G";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V7 == "\x02" && V8 == "\x02" && V9 == "\x02" && V1 =="A") //GHI
- {
- V8 = "H";
- S = "H";
- V1 = "\x02";
- S2 = "A";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 == "\x02" && V9 == "\x02" && V8 == "\x02" && V16 =="P") //JIH
- {
- V9 = "I";
- S = "I";
- V16 = "\x02";
- S2 = "P";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V16 == "\x02" && V9 == "\x02" && V8 == "\x02" && V10 =="J") //PIH
- {
- V9 = "I";
- S = "I";
- V10 = "\x02";
- S2 = "J";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 == "\x02" && V11 == "\x02" && V2 == "\x02" && V12 =="L") //JKB
- {
- V11 = "K";
- S = "K";
- V12 = "\x02";
- S2 = "L";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V12 == "\x02" && V11 == "\x02" && V2 == "\x02" && V10 =="J") //LKB
- {
- V11 = "K";
- S = "K";
- V10 = "\x02";
- S2 = "J";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V12 == "\x02" && V13 == "\x02" && V4 == "\x02" && V14 =="N") //LMD
- {
- V13 = "M";
- S = "M";
- V14 = "\x02";
- S2 = "N";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V14 == "\x02" && V13 == "\x02" && V4 == "\x02" && V12 =="L") //NMD
- {
- V13 = "M";
- S = "M";
- V12 = "\x02";
- S2 = "L";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V14 == "\x02" && V15 == "\x02" && V6 == "\x02" && V16 =="P") //NOF
- {
- V15 = "O";
- S = "O";
- V16 = "\x02";
- S2 = "P";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V16 == "\x02" && V15 == "\x02" && V6 == "\x02" && V14 =="N") //POF
- {
- V15 = "O";
- S = "O";
- V14 = "\x02";
- S2 = "N";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- //BLOCK MILL
- if (V10 == "\x01" && V12 == "\x01" && V11 == "K" && V2 == "\x02" && (V9 == "\x01" || V13 == "\x01"))
- {
- V2 = "B";
- S = "B";
- V11 = "\x02";
- S2 = "K";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V7 == "\x01" && V8 == "\x01" && V1 == "A" && V2 == "\x02" && (V9 == "\x01" || V6 == "\x01"))
- {
- V2 = "B";
- S = "B";
- V1 = "\x02";
- S2 = "A";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V4 == "\x01" && V5 == "\x01" && V3 == "C" && V2 == "\x02" && (V6 == "\x01" || V13 == "\x01"))
- {
- V2 = "B";
- S = "B";
- V3 = "\x02";
- S2 = "C";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V12 == "\x01" && V14 == "\x01" && V13 == "M" && V4 == "\x02" && (V11 == "\x01" || V15 == "\x01"))
- {
- V4 = "D";
- S = "D";
- V13 = "\x02";
- S2 = "M";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V6 == "\x01" && V7 == "\x01" && V5 == "E" && V4 == "\x02" && (V8 == "\x01" || V15 == "\x01"))
- {
- V4 = "D";
- S = "D";
- V5 = "\x02";
- S2 = "E";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V1 == "\x01" && V2 == "\x01" && V3 == "C" && V4 == "\x02" && (V8 == "\x01" || V11 == "\x01"))
- {
- V4 = "D";
- S = "D";
- V3 = "\x02";
- S2 = "C";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V16 == "\x01" && V14 == "\x01" && V15 == "O" && V6 == "\x02" && (V9 == "\x01" || V13 == "\x01"))
- {
- V6 = "F";
- S = "F";
- V15 = "\x02";
- S2 = "O";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V3 == "\x01" && V4 == "\x01" && V5 == "E" && V6 == "\x02" && (V3 == "\x01" || V13 == "\x01"))
- {
- V6 = "F";
- S = "F";
- V5 = "\x02";
- S2 = "E";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V1 == "\x01" && V8 == "\x01" && V7 == "G" && V6 == "\x02" && (V2 == "\x01" || V9 == "\x01"))
- {
- V6 = "F";
- S = "F";
- V7 = "\x02";
- S2 = "G";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V16 == "\x01" && V10 == "\x01" && V9 == "I" && V8 == "\x02" && (V11 == "\x01" || V15 == "\x01"))
- {
- V8 = "H";
- S = "H";
- V9 = "\x02";
- S2 = "I";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V2 == "\x01" && V3 == "\x01" && V1 == "A" && V8 == "\x02" && (V11 == "\x01" || V4 == "\x01"))
- {
- V8 = "H";
- S = "H";
- V1 = "\x02";
- S2 = "A";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V5 == "\x01" && V6 == "\x01" && V7 == "G" && V8 == "\x02" && (V4 == "\x01" || V15 == "\x01"))
- {
- V8 = "H";
- S = "H";
- V7 = "\x02";
- S2 = "G";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V1 == "\x01" && V7 == "\x01" && V8 == "H" && V9 == "\x02" && (V2 == "\x01" || V6 == "\x01"))
- {
- V9 = "I";
- S = "I";
- V8 = "\x02";
- S2 = "H";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V11 == "\x01" && V12 == "\x01" && V10 == "J" && V9 == "\x02" && (V2 == "\x01" || V13 == "\x01"))
- {
- V9 = "I";
- S = "I";
- V10 = "\x02";
- S2 = "J";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V14 == "\x01" && V15 == "\x01" && V16 == "P" && V9 == "\x02" && (V6 == "\x01" || V13 == "\x01"))
- {
- V9 = "I";
- S = "I";
- V16 = "\x02";
- S2 = "P";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V1 == "\x01" && V3 == "\x01" && V2 == "B" && V11 == "\x02" && (V8 == "\x01" || V4 == "\x01"))
- {
- V11 = "K";
- S = "K";
- V2 = "\x02";
- S2 = "B";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V16 == "\x01" && V9 == "\x01" && V10 == "J" && V11 == "\x02" && (V8 == "\x01" || V15 == "\x01"))
- {
- V11 = "K";
- S = "K";
- V10 = "\x02";
- S2 = "J";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V14 == "\x01" && V13 == "\x01" && V12 == "L" && V11 == "\x02" && (V4 == "\x01" || V15 == "\x01"))
- {
- V11 = "K";
- S = "K";
- V12 = "\x02";
- S2 = "L";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V5 == "\x01" && V3 == "\x01" && V4 == "D" && V13 == "\x02" && (V2 == "\x01" || V6 == "\x01"))
- {
- V13 = "M";
- S = "M";
- V4 = "\x02";
- S2 = "D";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 == "\x01" && V11 == "\x01" && V12 == "L" && V13 == "\x02" && (V2 == "\x01" || V9 == "\x01"))
- {
- V13 = "M";
- S = "M";
- V12 = "\x02";
- S2 = "L";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V16 == "\x01" && V15 == "\x01" && V14 == "N" && V13 == "\x02" && (V9 == "\x01" || V6 == "\x01"))
- {
- V13 = "M";
- S = "M";
- V14 = "\x02";
- S2 = "N";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V9 == "\x01" && V10 == "\x01" && V16 == "P" && V15 =="\x02" && (V8 == "\x01" || V11 == "\x01"))
- {
- V15 = "O";
- S = "O";
- V16 = "\x02";
- S2 = "P";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V7 == "\x01" && V5 == "\x01" && V6 == "F" && V15 =="\x02" && (V13 == "\x01" || V8 == "\x01"))
- {
- V15 = "O";
- S = "O";
- V6 = "\x02";
- S2 = "F";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V12 == "\x01" && V13 == "\x01" && V14 == "N" && V15 =="\x02" && (V4 == "\x01" || V11 == "\x01"))
- {
- V15 = "O";
- S = "O";
- V14 = "\x02";
- S2 = "N";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- //Randomizer (trap player pieces, set up mills (head to 2 pair), ELSE randomize)
- int Random;
- RMove:
- srand((unsigned)time(0));//randomizer
- Random = (rand()%16) +1; //1-16
- if (Random == 1)//A
- {
- if (V1 == "\x02" && (V2 == "B" || V8 == "H"))
- {
- if (V2 == "\x01" && V3 == "\x01" && (V4 == "\x01" || V11 == "\x01"))
- {
- goto RMove;
- }
- if (V7 == "\x01" && V8 == "\x01" && (V9 == "\x01" || V6 == "\x01"))
- {
- goto RMove;
- }
- if (V3 == "\x02" && V8 == "\x02" && V2 == "B")
- {
- V1 = "A";
- S = "A";
- V2 = "\x02";
- S2 = "B";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V7 == "\x02" && V8 == "H" && V2 == "\x02")
- {
- V1 = "A";
- S = "A";
- V8 = "\x02";
- S2 = "H";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- int Ran1; //if none of above
- srand((unsigned)time(0));//randomizer
- Ran1 = (rand()%2) +1; //1-2
- if (Ran1 == 1) //B
- {
- if (V2 == "B")
- {
- V1 = "A";
- S = "A";
- V2 = "\x02";
- S2 = "B";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- Ran1 = 2;
- }
- }
- if (Ran1 == 2) //H
- {
- if (V8 == "H")
- {
- V1 = "A";
- S = "A";
- V8 = "\x02";
- S2 = "H";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- Ran1 = 1;
- }
- }
- }
- if (V1 != "\x02" || (V2 != "B" && V2 != "H"))
- {
- goto RMove;
- }
- }
- if (Random == 2)//B
- {
- if (V2 == "\x02" && (V3 == "C" || V11 == "K" || V1 == "A"))
- {
- if (V1 == "\x01" && V3 == "\x01" && (V9 == "\x01" || V4 == "\x01"))
- {
- goto RMove;
- }
- if (V10 == "\x02" && V12 == "L" && V13 == "\x02" && V11 == "K")
- {
- V2 = "B";
- S = "B";
- V11 = "\x02";
- S2 = "K";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V12 == "\x02" && V10 == "J" && V9 == "\x02" && V11 == "K")
- {
- V2 = "B";
- S = "B";
- V11 = "\x02";
- S2 = "K";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- int RB; //if none of above
- RB1:
- srand((unsigned)time(0));//randomizer
- RB = (rand()%3) +1; //1-3
- if (RB == 1) //C
- {
- if (V3 == "C")
- {
- V2 = "B";
- S = "B";
- V3 = "\x02";
- S2 = "C";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto RB1;
- }
- }
- if (RB == 2) //A
- {
- if (V1 == "A")
- {
- V2 = "B";
- S = "B";
- V1 = "\x02";
- S2 = "A";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto RB1;
- }
- }
- if (RB == 3) //K
- {
- if (V11 == "K")
- {
- V2 = "B";
- S = "B";
- V11 = "\x02";
- S2 = "K";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto RB1;
- }
- }
- }
- if (V2 != "\x02" || (V3 != "C" && V11 != "K" && V1 != "A"))
- {
- goto RMove;
- }
- }
- if (Random == 3) //C
- {
- if (V3 == "\x02" && (V2 == "B" || V4 == "D"))
- {
- if (V2 == "\x01" && V1 == "\x01" && (V9 == "\x01" || V11 == "\x01"))
- {
- goto RMove;
- }
- if (V4 == "\x01" && V5 == "\x01" && (V6 == "\x01" || V13 == "\x01"))
- {
- goto RMove;
- }
- if (V1 == "\x02" && V4 == "\x02" && V2 == "B")
- {
- V3 = "C";
- S = "C";
- V2 = "\x02";
- S2 = "B";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V5 == "\x02" && V4 == "D" && V2 == "\x02")
- {
- V3 = "C";
- S = "C";
- V4 = "\x02";
- S2 = "D";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- int Ra3; //if none of above
- srand((unsigned)time(0));//randomizer
- Ra3 = (rand()%2) +1; //1-2
- if (Ra3 == 1) //B
- {
- if (V2 == "B")
- {
- V3 = "C";
- S = "C";
- V2 = "\x02";
- S2 = "B";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- Ra3 = 2;
- }
- }
- if (Ra3 == 2) //D
- {
- if (V4 == "D")
- {
- V3 = "C";
- S = "C";
- V4 = "\x02";
- S2 = "D";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- Ra3 = 1;
- }
- }
- }
- if (V3 != "\x02" || (V2 != "B" && V4 != "D"))
- {
- goto RMove;
- }
- }
- if (Random == 4) //D
- {
- if (V4 == "\x02" && (V3 == "C" || V5 == "E" || V13 == "M"))
- {
- if (V3 == "\x01" && V5 == "\x01" && (V2 == "\x01" || V6 == "\x01"))
- {
- goto RMove;
- }
- if (V14 == "\x02" && V12 == "L" && V11 == "\x02" && V13 == "M")
- {
- V4 = "D";
- S = "D";
- V13 = "\x02";
- S2 = "M";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V14 == "N" && V12 == "\X02" && V15 == "\x02" && V13 == "M")
- {
- V4 = "D";
- S = "D";
- V13 = "\x02";
- S2 = "M";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- int Ra4; //if none of above
- RD:
- srand((unsigned)time(0));//randomizer
- Ra4 = (rand()%3) +1; //1-3
- if (Ra4 == 1) //C
- {
- if (V3 == "C")
- {
- V4 = "D";
- S = "D";
- V3 = "\x02";
- S2 = "C";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto RD;
- }
- }
- if (Ra4 == 2) //E
- {
- if (V5 == "E")
- {
- V4 = "D";
- S = "D";
- V5 = "\x02";
- S2 = "E";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto RD;
- }
- }
- if (Ra4 == 3) //M
- {
- if (V13 == "M")
- {
- V4 = "D";
- S = "D";
- V13 = "\x02";
- S2 = "M";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto RD;
- }
- }
- }
- if (V4 != "\x02" || (V3 != "C" && V13 != "M" && V5 != "E"))
- {
- goto RMove;
- }
- }
- if (Random == 5) //E
- {
- if (V5 == "\x02" && (V4 == "D" || V6 == "F"))
- {
- if (V6 == "\x01" && V7 == "\x01" && (V8 == "\x01" || V15 == "\x01"))
- {
- goto RMove;
- }
- if (V4 == "\x01" && V3 == "\x01" && (V2 == "\x01" || V13 == "\x01"))
- {
- goto RMove;
- }
- if (V3 == "\x02" && V6 == "\x02" && V4 == "D")
- {
- V5 = "E";
- S = "E";
- V4 = "\x02";
- S2 = "D";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V7 == "\x02" && V6 == "F" && V4 == "\x02")
- {
- V5 = "E";
- S = "E";
- V6 = "\x02";
- S2 = "F";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- int RE; //if none of above
- srand((unsigned)time(0));//randomizer
- RE = (rand()%2) +1; //1-2
- if (RE == 1) //D
- {
- if (V4 == "D")
- {
- V5 = "E";
- S = "E";
- V4 = "\x02";
- S2 = "D";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- RE = 2;
- }
- }
- if (RE == 2) //F
- {
- if (V6 == "F")
- {
- V5 = "E";
- S = "E";
- V6 = "\x02";
- S2 = "F";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- RE = 1;
- }
- }
- }
- if (V5 != "\x02" || (V4 != "D" && V6 != "F"))
- {
- goto RMove;
- }
- }
- if (Random == 6)//F
- {
- if (V6 == "\x02" && (V5 == "E" || V7 == "G" || V15 == "O"))
- {
- if (V5 == "\x01" && V7 == "\x01" && (V4 == "\x01" || V8 == "\x01"))
- {
- goto RMove;
- }
- if (V9 == "\x02" && V16 == "P" && V14 == "\x02" && V15 == "O")
- {
- V6 = "F";
- S = "F";
- V15 = "\x02";
- S2 = "O";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V14 == "N" && V13 == "\X02" && V16 == "\x02" && V15 == "O")
- {
- V6 = "F";
- S = "F";
- V15 = "\x02";
- S2 = "O";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- int Ra5; //if none of above
- RF:
- srand((unsigned)time(0));//randomizer
- Ra5 = (rand()%3) +1; //1-3
- if (Ra5 == 1) //G
- {
- if (V7 == "G")
- {
- V6 = "F";
- S = "F";
- V7 = "\x02";
- S2 = "G";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto RF;
- }
- }
- if (Ra5 == 2) //E
- {
- if (V5 == "E")
- {
- V6 = "F";
- S = "F";
- V5 = "\x02";
- S2 = "E";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto RF;
- }
- }
- if (Ra5 == 3) //O
- {
- if (V15 == "O")
- {
- V6 = "F";
- S = "F";
- V15 = "\x02";
- S2 = "O";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto RF;
- }
- }
- }
- if (V6 != "\x02" || (V5 != "E" && V7 != "G" && V15 != "O"))
- {
- goto RMove;
- }
- }
- if (Random == 7) //G
- {
- if (V7 == "\x02" && (V6 == "F" || V8 == "H"))
- {
- if (V1 == "\x01" && V8 == "\x01" && (V2 == "\x01" || V9 == "\x01"))
- {
- goto RMove;
- }
- if (V6 == "\x01" && V5 == "\x01" && (V4 == "\x01" || V15 == "\x01"))
- {
- goto RMove;
- }
- if (V1 == "\x02" && V6 == "\x02" && V8 == "H")
- {
- V7 = "G";
- S = "G";
- V8 = "\x02";
- S2 = "H";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V5 == "\x02" && V6 == "F" && V8 == "\x02")
- {
- V7 = "G";
- S = "G";
- V6 = "\x02";
- S2 = "F";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- int RG; //if none of above
- srand((unsigned)time(0));//randomizer
- RG = (rand()%2) +1; //1-2
- if (RG == 1) //F
- {
- if (V6 == "F")
- {
- V7 = "G";
- S = "G";
- V6 = "\x02";
- S2 = "F";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- RG = 2;
- }
- }
- if (RG == 2) //H
- {
- if (V8 == "H")
- {
- V7 = "G";
- S = "G";
- V8 = "\x02";
- S2 = "H";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- RG = 1;
- }
- }
- }
- if (V7 != "\x02" || (V6 != "F" && V8 != "H"))
- {
- goto RMove;
- }
- }
- if (Random == 8) //H
- {
- if (V8 == "\x02" && (V1 == "A" || V7 == "G" || V9 == "I"))
- {
- if (V1 == "\x01" && V7 == "\x01" && (V2 == "\x01" || V6 == "\x01"))
- {
- goto RMove;
- }
- if (V16 == "\x02" && V10 == "J" && V11 == "\x02" && V9 == "I")
- {
- V8 = "H";
- S = "H";
- V9 = "\x02";
- S2 = "I";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V16 == "P" && V15 == "\X02" && V10 == "\x02" && V9 == "I")
- {
- V8 = "H";
- S = "H";
- V9 = "\x02";
- S2 = "I";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- int Ra6; //if none of above
- RH:
- srand((unsigned)time(0));//randomizer
- Ra6 = (rand()%3) +1; //1-3
- if (Ra6 == 1) //G
- {
- if (V7 == "G")
- {
- V8 = "H";
- S = "H";
- V7 = "\x02";
- S2 = "G";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto RH;
- }
- }
- if (Ra6 == 2) //A
- {
- if (V1 == "A")
- {
- V8 = "H";
- S = "H";
- V1 = "\x02";
- S2 = "A";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto RH;
- }
- }
- if (Ra6 == 3) //I
- {
- if (V9 == "I")
- {
- V8 = "H";
- S = "H";
- V9 = "\x02";
- S2 = "I";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto RH;
- }
- }
- }
- if (V8 != "\x02" || (V1 != "A" && V7 != "G" && V9 != "I"))
- {
- goto RMove;
- }
- }
- if (Random == 9) //I
- {
- if (V9 == "\x02" && (V10 == "J" || V8 == "H" || V16 == "P"))
- {
- if (V10 == "\x01" && V16 == "\x01" && (V11 == "\x01" || V15 == "\x01"))
- {
- goto RMove;
- }
- if (V2 == "\x02" && V1 == "A" && V7 == "\x02" && V8 == "H")
- {
- V9 = "I";
- S = "I";
- V8 = "\x02";
- S2 = "H";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V7 == "G" && V1 == "\X02" && V6 == "\x02" && V8 == "H")
- {
- V9 = "I";
- S = "I";
- V8 = "\x02";
- S2 = "H";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- int Ra7; //if none of above
- RI:
- srand((unsigned)time(0));//randomizer
- Ra7 = (rand()%3) +1; //1-3
- if (Ra7 == 1) //J
- {
- if (V10 == "J")
- {
- V9 = "I";
- S = "I";
- V10 = "\x02";
- S2 = "J";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto RI;
- }
- }
- if (Ra7 == 2) //H
- {
- if (V8 == "H")
- {
- V9 = "I";
- S = "I";
- V8 = "\x02";
- S2 = "H";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto RI;
- }
- }
- if (Ra7 == 3) //P
- {
- if (V16 == "P")
- {
- V9 = "I";
- S = "I";
- V16 = "\x02";
- S2 = "P";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto RI;
- }
- }
- }
- if (V9 != "\x02" || (V10 != "J" && V8 != "H" && V16 != "P"))
- {
- goto RMove;
- }
- }
- if (Random == 10) //J
- {
- if (V10 == "\x02" && (V9 == "I" || V11 == "K"))
- {
- if (V11 == "\x01" && V12 == "\x01" && (V2 == "\x01" || V13 == "\x01"))
- {
- goto RMove;
- }
- if (V16 == "\x01" && V9 == "\x01" && (V8 == "\x01" || V15 == "\x01"))
- {
- goto RMove;
- }
- if (V9 == "\x02" && V12 == "\x02" && V11 == "K")
- {
- V10 = "J";
- S = "J";
- V11 = "\x02";
- S2 = "K";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V16 == "\x02" && V9 == "I" && V11 == "\x02")
- {
- V10 = "J";
- S = "J";
- V9 = "\x02";
- S2 = "I";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- int RJ; //if none of above
- srand((unsigned)time(0));//randomizer
- RJ = (rand()%2) +1; //1-2
- if (RJ == 1) //I
- {
- if (V9 == "I")
- {
- V10 = "J";
- S = "J";
- V9 = "\x02";
- S2 = "I";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- RJ = 2;
- }
- }
- if (RJ == 2) //K
- {
- if (V11 == "K")
- {
- V10 = "J";
- S = "J";
- V11 = "\x02";
- S2 = "K";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- RJ = 1;
- }
- }
- }
- if (V10 != "\x02" || (V9 != "I" && V11 != "K"))
- {
- goto RMove;
- }
- }
- if (Random == 11) //K
- {
- if (V11 == "\x02" && (V10 == "J" || V2 == "B" || V12 == "L"))
- {
- if (V10 == "\x01" && V12 == "\x01" && (V9 == "\x01" || V13 == "\x01"))
- {
- goto RMove;
- }
- if (V8 == "\x02" && V1 == "A" && V3 == "\x02" && V2 == "B")
- {
- V11 = "K";
- S = "K";
- V2 = "\x02";
- S2 = "B";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V3 == "C" && V1 == "\X02" && V4 == "\x02" && V2 == "B")
- {
- V11 = "K";
- S = "K";
- V2 = "\x02";
- S2 = "B";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- int Ra8; //if none of above
- RK:
- srand((unsigned)time(0));//randomizer
- Ra8 = (rand()%3) +1; //1-3
- if (Ra8 == 1) //J
- {
- if (V10 == "J")
- {
- V11 = "K";
- S = "K";
- V10 = "\x02";
- S2 = "J";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto RK;
- }
- }
- if (Ra8 == 2) //L
- {
- if (V12 == "L")
- {
- V11 = "K";
- S = "K";
- V12 = "\x02";
- S2 = "L";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto RK;
- }
- }
- if (Ra8 == 3) //B
- {
- if (V2 == "B")
- {
- V11 = "K";
- S = "K";
- V2 = "\x02";
- S2 = "B";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto RK;
- }
- }
- }
- if (V11 != "\x02" || (V10 != "J" && V12 != "L" && V2 != "B"))
- {
- goto RMove;
- }
- }
- if (Random == 12) //L
- {
- if (V12 == "\x02" && (V11 == "K" || V13 == "M"))
- {
- if (V13 == "\x01" && V14 == "\x01" && (V4 == "\x01" || V15 == "\x01"))
- {
- goto RMove;
- }
- if (V10 == "\x01" && V11 == "\x01" && (V9 == "\x01" || V13 == "\x01"))
- {
- goto RMove;
- }
- if (V13 == "\x02" && V10 == "\x02" && V11 == "K")
- {
- V12 = "L";
- S = "L";
- V11 = "\x02";
- S2 = "K";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V14 == "\x02" && V13 == "M" && V11 == "\x02")
- {
- V12 = "L";
- S = "L";
- V13 = "\x02";
- S2 = "M";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- int RL; //if none of above
- srand((unsigned)time(0));//randomizer
- RL = (rand()%2) +1; //1-2
- if (RL == 1) //M
- {
- if (V13 == "M")
- {
- V12 = "L";
- S = "L";
- V13 = "\x02";
- S2 = "M";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- RL = 2;
- }
- }
- if (RL == 2) //K
- {
- if (V11 == "K")
- {
- V12 = "L";
- S = "L";
- V11 = "\x02";
- S2 = "K";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- RL = 1;
- }
- }
- }
- if (V12 != "\x02" || (V11 != "K" && V13 != "M"))
- {
- goto RMove;
- }
- }
- if (Random == 13) //M
- {
- if (V13 == "\x02" && (V12 == "L" || V14 == "N" || V4 == "D"))
- {
- if (V14 == "\x01" && V12 == "\x01" && (V11 == "\x01" || V15 == "\x01"))
- {
- goto RMove;
- }
- if (V6 == "\x02" && V5 == "E" && V3 == "\x02" && V4 == "D")
- {
- V13 = "M";
- S = "M";
- V4 = "\x02";
- S2 = "D";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V3 == "C" && V2 == "\X02" && V5 == "\x02" && V4 == "D")
- {
- V13 = "M";
- S = "M";
- V4 = "\x02";
- S2 = "D";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- int Ra9; //if none of above
- RM:
- srand((unsigned)time(0));//randomizer
- Ra9 = (rand()%3) +1; //1-3
- if (Ra9 == 1) //L
- {
- if (V12 == "L")
- {
- V13 = "M";
- S = "M";
- V12 = "\x02";
- S2 = "L";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto RM;
- }
- }
- if (Ra9 == 2) //N
- {
- if (V14 == "N")
- {
- V13 = "M";
- S = "M";
- V14 = "\x02";
- S2 = "N";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto RM;
- }
- }
- if (Ra9 == 3) //D
- {
- if (V4 == "D")
- {
- V13 = "M";
- S = "M";
- V4 = "\x02";
- S2 = "D";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto RM;
- }
- }
- }
- if (V13 != "\x02" || (V12 != "L" && V14 != "N" && V4 != "D"))
- {
- goto RMove;
- }
- }
- if (Random == 14) //N
- {
- if (V14 == "\x02" && (V15 == "O" || V13 == "M"))
- {
- if (V15 == "\x01" && V16 == "\x01" && (V9 == "\x01" || V6 == "\x01"))
- {
- goto RMove;
- }
- if (V12 == "\x01" && V13 == "\x01" && (V11 == "\x01" || V4 == "\x01"))
- {
- goto RMove;
- }
- if (V15 == "\x02" && V12 == "\x02" && V13 == "M")
- {
- V14 = "N";
- S = "N";
- V13 = "\x02";
- S2 = "M";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V16 == "\x02" && V15 == "O" && V13 == "\x02")
- {
- V14 = "N";
- S = "N";
- V15 = "\x02";
- S2 = "O";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- int RN; //if none of above
- srand((unsigned)time(0));//randomizer
- RN = (rand()%2) +1; //1-2
- if (RN == 1) //M
- {
- if (V13 == "M")
- {
- V14 = "N";
- S = "N";
- V13 = "\x02";
- S2 = "M";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- RN = 2;
- }
- }
- if (RN == 2) //O
- {
- if (V15 == "O")
- {
- V14 = "N";
- S = "N";
- V15 = "\x02";
- S2 = "O";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- RN = 1;
- }
- }
- }
- if (V14 != "\x02" || (V15 != "O" && V13 != "M"))
- {
- goto RMove;
- }
- }
- if ( Random == 15) //O
- {
- if (V15 == "\x02" && (V16 == "P" || V14 == "N" || V6 == "F"))
- {
- if (V14 == "\x01" && V16 == "\x01" && (V9 == "\x01" || V13 == "\x01"))
- {
- goto RMove;
- }
- if (V7 == "\x02" && V5 == "E" && V4 == "\x02" && V6 == "F")
- {
- V15 = "O";
- S = "O";
- V6 = "\x02";
- S2 = "F";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V7 == "G" && V8 == "\X02" && V5 == "\x02" && V6 == "F")
- {
- V15 = "O";
- S = "O";
- V6 = "\x02";
- S2 = "F";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- int Ra10; //if none of above
- RO:
- srand((unsigned)time(0));//randomizer
- Ra10 = (rand()%3) +1; //1-3
- if (Ra10 == 1) //P
- {
- if (V16 == "P")
- {
- V15 = "O";
- S = "O";
- V16 = "\x02";
- S2 = "P";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto RO;
- }
- }
- if (Ra10 == 2) //N
- {
- if (V14 == "N")
- {
- V15 = "O";
- S = "O";
- V14 = "\x02";
- S2 = "N";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto RO;
- }
- }
- if (Ra10 == 3) //F
- {
- if (V6 == "F")
- {
- V15 = "O";
- S = "O";
- V6 = "\x02";
- S2 = "F";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto RO;
- }
- }
- }
- if (V15 != "\x02" || (V16 != "P" && V14 != "N" && V6 != "F"))
- {
- goto RMove;
- }
- }
- if (Random == 16) //P
- {
- if (V16 == "\x02" && (V15 == "O" || V9 == "I"))
- {
- if (V15 == "\x01" && V14 == "\x01" && (V6 == "\x01" || V13 == "\x01"))
- {
- goto RMove;
- }
- if (V10 == "\x01" && V9 == "\x01" && (V8 == "\x01" || V11 == "\x01"))
- {
- goto RMove;
- }
- if (V15 == "\x02" && V10 == "\x02" && V9 == "I")
- {
- V16 = "P";
- S = "P";
- V9 = "\x02";
- S2 = "I";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V14 == "\x02" && V15 == "O" && V9 == "\x02")
- {
- V16 = "P";
- S = "P";
- V15 = "\x02";
- S2 = "O";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- int RP; //if none of above
- srand((unsigned)time(0));//randomizer
- RP = (rand()%2) +1; //1-2
- if (RP == 1) //I
- {
- if (V9 == "I")
- {
- V16 = "P";
- S = "P";
- V9 = "\x02";
- S2 = "I";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- RP = 2;
- }
- }
- if (RP == 2) //O
- {
- if (V15 == "O")
- {
- V16 = "P";
- S = "P";
- V15 = "\x02";
- S2 = "O";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- RP = 1;
- }
- }
- }
- if (V16 != "\x02" || (V15 != "O" && V9 != "I"))
- {
- goto RMove;
- }
- }
- Chk = Chk +1;
- if (Chk >=2)//randomizer if nothing else works
- {
- int Check;
- CMove:
- srand((unsigned)time(0));//randomizer
- Check = (rand()%16) +1; //1-16
- if (Check == 1)//A
- {
- if (V1 == "\x02" && (V2 == "B" || V8 == "H"))
- {
- int Ch1; //if none of above
- srand((unsigned)time(0));//randomizer
- Ch1 = (rand()%2) +1; //1-2
- if (Ch1 == 1) //B
- {
- if (V2 == "B")
- {
- V1 = "A";
- S = "A";
- V2 = "\x02";
- S2 = "B";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- Ch1 = 2;
- }
- }
- if (Ch1 == 2) //H
- {
- if (V8 == "H")
- {
- V1 = "A";
- S = "A";
- V8 = "\x02";
- S2 = "H";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- Ch1 = 1;
- }
- }
- }
- if (V1 != "\x02" || (V2 != "B" && V2 != "H"))
- {
- goto CMove;
- }
- }
- if (Check == 2)//B
- {
- if (V2 == "\x02" && (V3 == "C" || V11 == "K" || V1 == "A"))
- {
- int CB; //if none of above
- CHB1:
- srand((unsigned)time(0));//randomizer
- CB = (rand()%3) +1; //1-3
- if (CB == 1) //C
- {
- if (V3 == "C")
- {
- V2 = "B";
- S = "B";
- V3 = "\x02";
- S2 = "C";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto CHB1;
- }
- }
- if (CB == 2) //A
- {
- if (V1 == "A")
- {
- V2 = "B";
- S = "B";
- V1 = "\x02";
- S2 = "A";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto CHB1;
- }
- }
- if (CB == 3) //K
- {
- if (V11 == "K")
- {
- V2 = "B";
- S = "B";
- V11 = "\x02";
- S2 = "K";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto CHB1;
- }
- }
- }
- if (V2 != "\x02" || (V3 != "C" && V11 != "K" && V1 != "A"))
- {
- goto CMove;
- }
- }
- if (Check == 3) //C
- {
- if (V3 == "\x02" && (V2 == "B" || V4 == "D"))
- {
- int Ch3; //if none of above
- srand((unsigned)time(0));//randomizer
- Ch3 = (rand()%2) +1; //1-2
- if (Ch3 == 1) //B
- {
- if (V2 == "B")
- {
- V3 = "C";
- S = "C";
- V2 = "\x02";
- S2 = "B";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- Ch3 = 2;
- }
- }
- if (Ch3 == 2) //D
- {
- if (V4 == "D")
- {
- V3 = "C";
- S = "C";
- V4 = "\x02";
- S2 = "D";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- Ch3 = 1;
- }
- }
- }
- if (V3 != "\x02" || (V2 != "B" && V4 != "D"))
- {
- goto CMove;
- }
- }
- if (Check == 4) //D
- {
- if (V4 == "\x02" && (V3 == "C" || V5 == "E" || V13 == "M"))
- {
- int Ch4; //if none of above
- CD:
- srand((unsigned)time(0));//randomizer
- Ch4 = (rand()%3) +1; //1-3
- if (Ch4 == 1) //C
- {
- if (V3 == "C")
- {
- V4 = "D";
- S = "D";
- V3 = "\x02";
- S2 = "C";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto CD;
- }
- }
- if (Ch4 == 2) //E
- {
- if (V5 == "E")
- {
- V4 = "D";
- S = "D";
- V5 = "\x02";
- S2 = "E";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto CD;
- }
- }
- if (Ch4 == 3) //M
- {
- if (V13 == "M")
- {
- V4 = "D";
- S = "D";
- V13 = "\x02";
- S2 = "M";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto CD;
- }
- }
- }
- if (V4 != "\x02" || (V3 != "C" && V13 != "M" && V5 != "E"))
- {
- goto CMove;
- }
- }
- if (Check == 5) //E
- {
- if (V5 == "\x02" && (V4 == "D" || V6 == "F"))
- {
- int CE; //if none of above
- srand((unsigned)time(0));//randomizer
- CE = (rand()%2) +1; //1-2
- if (CE == 1) //D
- {
- if (V4 == "D")
- {
- V5 = "E";
- S = "E";
- V4 = "\x02";
- S2 = "D";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- CE = 2;
- }
- }
- if (CE == 2) //F
- {
- if (V6 == "F")
- {
- V5 = "E";
- S = "E";
- V6 = "\x02";
- S2 = "F";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- CE = 1;
- }
- }
- }
- if (V5 != "\x02" || (V4 != "D" && V6 != "F"))
- {
- goto CMove;
- }
- }
- if (Check == 6)//F
- {
- if (V6 == "\x02" && (V5 == "E" || V7 == "G" || V15 == "O"))
- {
- int Ch5; //if none of above
- CF:
- srand((unsigned)time(0));//randomizer
- Ch5 = (rand()%3) +1; //1-3
- if (Ch5 == 1) //G
- {
- if (V7 == "G")
- {
- V6 = "F";
- S = "F";
- V7 = "\x02";
- S2 = "G";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto CF;
- }
- }
- if (Ch5 == 2) //E
- {
- if (V5 == "E")
- {
- V6 = "F";
- S = "F";
- V5 = "\x02";
- S2 = "E";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto CF;
- }
- }
- if (Ch5 == 3) //O
- {
- if (V15 == "O")
- {
- V6 = "F";
- S = "F";
- V15 = "\x02";
- S2 = "O";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto CF;
- }
- }
- }
- if (V6 != "\x02" || (V5 != "E" && V7 != "G" && V15 != "O"))
- {
- goto CMove;
- }
- }
- if (Check == 7) //G
- {
- if (V7 == "\x02" && (V6 == "F" || V8 == "H"))
- {
- int CG; //if none of above
- srand((unsigned)time(0));//randomizer
- CG = (rand()%2) +1; //1-2
- if (CG == 1) //F
- {
- if (V6 == "F")
- {
- V7 = "G";
- S = "G";
- V6 = "\x02";
- S2 = "F";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- CG = 2;
- }
- }
- if (CG == 2) //H
- {
- if (V8 == "H")
- {
- V7 = "G";
- S = "G";
- V8 = "\x02";
- S2 = "H";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- CG = 1;
- }
- }
- }
- if (V7 != "\x02" || (V6 != "F" && V8 != "H"))
- {
- goto CMove;
- }
- }
- if (Check == 8) //H
- {
- if (V8 == "\x02" && (V1 == "A" || V7 == "G" || V9 == "I"))
- {
- int Ch6; //if none of above
- CH:
- srand((unsigned)time(0));//randomizer
- Ch6 = (rand()%3) +1; //1-3
- if (Ch6 == 1) //G
- {
- if (V7 == "G")
- {
- V8 = "H";
- S = "H";
- V7 = "\x02";
- S2 = "G";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto CH;
- }
- }
- if (Ch6 == 2) //A
- {
- if (V1 == "A")
- {
- V8 = "H";
- S = "H";
- V1 = "\x02";
- S2 = "A";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto CH;
- }
- }
- if (Ch6 == 3) //I
- {
- if (V9 == "I")
- {
- V8 = "H";
- S = "H";
- V9 = "\x02";
- S2 = "I";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto CH;
- }
- }
- }
- if (V8 != "\x02" || (V1 != "A" && V7 != "G" && V9 != "I"))
- {
- goto CMove;
- }
- }
- if (Check == 9) //I
- {
- if (V9 == "\x02" && (V10 == "J" || V8 == "H" || V16 == "P"))
- {
- int Ch7; //if none of above
- CI:
- srand((unsigned)time(0));//randomizer
- Ch7 = (rand()%3) +1; //1-3
- if (Ch7 == 1) //J
- {
- if (V10 == "J")
- {
- V9 = "I";
- S = "I";
- V10 = "\x02";
- S2 = "J";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto CI;
- }
- }
- if (Ch7 == 2) //H
- {
- if (V8 == "H")
- {
- V9 = "I";
- S = "I";
- V8 = "\x02";
- S2 = "H";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto CI;
- }
- }
- if (Ch7 == 3) //P
- {
- if (V16 == "P")
- {
- V9 = "I";
- S = "I";
- V16 = "\x02";
- S2 = "P";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto CI;
- }
- }
- }
- if (V9 != "\x02" || (V10 != "J" && V8 != "H" && V16 != "P"))
- {
- goto CMove;
- }
- }
- if (Check == 10) //J
- {
- if (V10 == "\x02" && (V9 == "I" || V11 == "K"))
- {
- int CJ; //if none of above
- srand((unsigned)time(0));//randomizer
- CJ = (rand()%2) +1; //1-2
- if (CJ == 1) //I
- {
- if (V9 == "I")
- {
- V10 = "J";
- S = "J";
- V9 = "\x02";
- S2 = "I";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- CJ = 2;
- }
- }
- if (CJ == 2) //K
- {
- if (V11 == "K")
- {
- V10 = "J";
- S = "J";
- V11 = "\x02";
- S2 = "K";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- CJ = 1;
- }
- }
- }
- if (V10 != "\x02" || (V9 != "I" && V11 != "K"))
- {
- goto CMove;
- }
- }
- if (Check == 11) //K
- {
- if (V11 == "\x02" && (V10 == "J" || V2 == "B" || V12 == "L"))
- {
- int Ch8; //if none of above
- CK:
- srand((unsigned)time(0));//randomizer
- Ch8 = (rand()%3) +1; //1-3
- if (Ch8 == 1) //J
- {
- if (V10 == "J")
- {
- V11 = "K";
- S = "K";
- V10 = "\x02";
- S2 = "J";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto CK;
- }
- }
- if (Ch8 == 2) //L
- {
- if (V12 == "L")
- {
- V11 = "K";
- S = "K";
- V12 = "\x02";
- S2 = "L";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto CK;
- }
- }
- if (Ch8 == 3) //B
- {
- if (V2 == "B")
- {
- V11 = "K";
- S = "K";
- V2 = "\x02";
- S2 = "B";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto CK;
- }
- }
- }
- if (V11 != "\x02" || (V10 != "J" && V12 != "L" && V2 != "B"))
- {
- goto CMove;
- }
- }
- if (Check == 12) //L
- {
- if (V12 == "\x02" && (V11 == "K" || V13 == "M"))
- {
- int CL; //if none of above
- srand((unsigned)time(0));//randomizer
- CL = (rand()%2) +1; //1-2
- if (CL == 1) //M
- {
- if (V13 == "M")
- {
- V12 = "L";
- S = "L";
- V13 = "\x02";
- S2 = "M";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- CL = 2;
- }
- }
- if (CL == 2) //K
- {
- if (V11 == "K")
- {
- V12 = "L";
- S = "L";
- V11 = "\x02";
- S2 = "K";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- CL = 1;
- }
- }
- }
- if (V12 != "\x02" || (V11 != "K" && V13 != "M"))
- {
- goto CMove;
- }
- }
- if (Check == 13) //M
- {
- if (V13 == "\x02" && (V12 == "L" || V14 == "N" || V4 == "D"))
- {
- int Ch9; //if none of above
- CM:
- srand((unsigned)time(0));//randomizer
- Ch9 = (rand()%3) +1; //1-3
- if (Ch9 == 1) //L
- {
- if (V12 == "L")
- {
- V13 = "M";
- S = "M";
- V12 = "\x02";
- S2 = "L";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto CM;
- }
- }
- if (Ch9 == 2) //N
- {
- if (V14 == "N")
- {
- V13 = "M";
- S = "M";
- V14 = "\x02";
- S2 = "N";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto CM;
- }
- }
- if (Ch9 == 3) //D
- {
- if (V4 == "D")
- {
- V13 = "M";
- S = "M";
- V4 = "\x02";
- S2 = "D";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto CM;
- }
- }
- }
- if (V13 != "\x02" || (V12 != "L" && V14 != "N" && V4 != "D"))
- {
- goto CMove;
- }
- }
- if (Check == 14) //N
- {
- if (V14 == "\x02" && (V15 == "O" || V13 == "M"))
- {
- int CN; //if none of above
- srand((unsigned)time(0));//randomizer
- CN = (rand()%2) +1; //1-2
- if (CN == 1) //M
- {
- if (V13 == "M")
- {
- V14 = "N";
- S = "N";
- V13 = "\x02";
- S2 = "M";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- CN = 2;
- }
- }
- if (CN == 2) //O
- {
- if (V15 == "O")
- {
- V14 = "N";
- S = "N";
- V15 = "\x02";
- S2 = "O";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- CN = 1;
- }
- }
- }
- if (V14 != "\x02" || (V15 != "O" && V13 != "M"))
- {
- goto CMove;
- }
- }
- if ( Check == 15) //O
- {
- if (V15 == "\x02" && (V16 == "P" || V14 == "N" || V6 == "F"))
- {
- int Ch10; //if none of above
- CO:
- srand((unsigned)time(0));//randomizer
- Ch10 = (rand()%3) +1; //1-3
- if (Ch10 == 1) //P
- {
- if (V16 == "P")
- {
- V15 = "O";
- S = "O";
- V16 = "\x02";
- S2 = "P";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto CO;
- }
- }
- if (Ch10 == 2) //N
- {
- if (V14 == "N")
- {
- V15 = "O";
- S = "O";
- V14 = "\x02";
- S2 = "N";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto CO;
- }
- }
- if (Ch10 == 3) //F
- {
- if (V6 == "F")
- {
- V15 = "O";
- S = "O";
- V6 = "\x02";
- S2 = "F";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- goto CO;
- }
- }
- }
- if (V15 != "\x02" || (V16 != "P" && V14 != "N" && V6 != "F"))
- {
- goto CMove;
- }
- }
- if (Check == 16) //P
- {
- if (V16 == "\x02" && (V15 == "O" || V9 == "I"))
- {
- int CP; //if none of above
- srand((unsigned)time(0));//randomizer
- CP = (rand()%2) +1; //1-2
- if (CP == 1) //I
- {
- if (V9 == "I")
- {
- V16 = "P";
- S = "P";
- V9 = "\x02";
- S2 = "I";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- CP = 2;
- }
- }
- if (CP == 2) //O
- {
- if (V15 == "O")
- {
- V16 = "P";
- S = "P";
- V15 = "\x02";
- S2 = "O";
- Val = "\x01";
- system("cls");
- system("cls");
- goto Board2;
- }
- else
- {
- CP = 1;
- }
- }
- }
- if (V16 != "\x02" || (V15 != "O" && V9 != "I"))
- {
- goto CMove;
- }
- }
- }
- goto CTop;
- } //end of computer move code
- if (N1 > 0 && Val == "\x01" && Mill < 1 && Mi2 < 1) //PLACE PIECES
- {
- if (F1 == 1)
- {
- cout << " Computer placed a piece at " << Spot << ".\n";
- }
- if (C == 0)
- {
- cout << endl;
- }
- if (C == 1)
- {
- cout << " Computer captured a piece at " << Took << ".\n\n";
- C = 0;
- }
- cout << " "<<Dir<<" ";
- cin >> Move;
- cout << " "<<D2<<" \n";
- }
- if (N2 > 0 && Val == "\x02" && Mill < 1 && Mi2 <1) //computer places piece
- {
- cout << " Computer is thinking. ";
- if (N2 == 6) //FIRST MOVE RANDOMIZER
- {
- F1 = 1;
- int R2;
- Ra2:
- srand((unsigned)time(0));//randomizer
- R2 = (rand()%16) +1; //1-16
- if (R2 == 1)
- {
- if (V1 == "A")
- {
- Spot = "A";
- V1 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- if (V1=="\x02" && V2 =="\x02" && V3 =="\x02")
- {
- Mi2 = 1;
- }
- if (V1=="\x02" && V8 =="\x02" && V7 =="\x02")
- {
- Mi2 = 1;
- }
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V1 != "A")
- {
- goto Ra2;
- }
- }
- if (R2 == 2)
- {
- if (V2 == "B")
- {
- Spot = "B";
- V2 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- if (V1=="\x02" && V2 =="\x02" && V3 =="\x02")
- {
- Mi2 = 1;
- }
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V2 != "B")
- {
- goto Ra2;
- }
- }
- if (R2 == 3)
- {
- if (V3 == "C")
- {
- Spot = "C";
- V3 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- if (V1=="\x02" && V2 =="\x02" && V3 =="\x02")
- {
- Mi2 = 1;
- }
- if (V3=="\x02" && V4 =="\x02" && V5 =="\x02")
- {
- Mi2 = 1;
- }
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V3 != "C")
- {
- goto Ra2;
- }
- }
- if (R2 == 4)
- {
- if (V4 == "D")
- {
- Spot = "D";
- V4 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- if (V3=="\x02" && V4 =="\x02" && V5 =="\x02")
- {
- Mi2 = 1;
- }
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V4 != "D")
- {
- goto Ra2;
- }
- }
- if (R2 == 5)
- {
- if (V5 == "E")
- {
- Spot = "E";
- V5 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- if (V3=="\x02" && V4 =="\x02" && V5 =="\x02")
- {
- Mi2 = 1;
- }
- if (V5=="\x02" && V6 =="\x02" && V7 =="\x02")
- {
- Mi2 = 1;
- }
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V5 != "E")
- {
- goto Ra2;
- }
- }
- if (R2 == 6)
- {
- if (V6 == "F")
- {
- Spot = "F";
- V6 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- if (V5=="\x02" && V6 =="\x02" && V7 =="\x02")
- {
- Mi2 = 1;
- }
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V6 != "F")
- {
- goto Ra2;
- }
- }
- if (R2 == 7)
- {
- if (V7 == "G")
- {
- Spot = "G";
- V7 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- if (V1=="\x02" && V8 =="\x02" && V7 =="\x02")
- {
- Mi2 = 1;
- }
- if (V5=="\x02" && V6 =="\x02" && V7 =="\x02")
- {
- Mi2 = 1;
- }
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V7 != "G")
- {
- goto Ra2;
- }
- }
- if (R2 == 8)
- {
- if (V8 == "H")
- {
- Spot = "H";
- V8 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- if (V1=="\x02" && V8 =="\x02" && V7 =="\x02")
- {
- Mi2 = 1;
- }
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V8 != "H")
- {
- goto Ra2;
- }
- }
- if (R2 == 9)
- {
- if (V9 == "I")
- {
- Spot = "I";
- V9 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- if (V10=="\x02" && V9 =="\x02" && V16 =="\x02")
- {
- Mi2 = 1;
- }
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V9 != "I")
- {
- goto Ra2;
- }
- }
- if (R2 == 10)
- {
- if (V10 == "J")
- {
- Spot = "J";
- V10 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- if (V10=="\x02" && V9 =="\x02" && V16 =="\x02")
- {
- Mi2 = 1;
- }
- if (V10=="\x02" && V11 =="\x02" && V12 =="\x02")
- {
- Mi2 = 1;
- }
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 != "J")
- {
- goto Ra2;
- }
- }
- if (R2 == 11)
- {
- if (V11 == "K")
- {
- Spot = "K";
- V11 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- if (V10=="\x02" && V11 =="\x02" && V12 =="\x02")
- {
- Mi2 = 1;
- }
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V11 != "K")
- {
- goto Ra2;
- }
- }
- if (R2 == 12)
- {
- if (V12 == "L")
- {
- Spot = "L";
- V12 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- if (V10=="\x02" && V11 =="\x02" && V12 =="\x02")
- {
- Mi2 = 1;
- }
- if (V12=="\x02" && V13 =="\x02" && V14 =="\x02")
- {
- Mi2 = 1;
- }
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V12 != "L")
- {
- goto Ra2;
- }
- }
- if (R2 == 13)
- {
- if (V13 == "M")
- {
- Spot = "M";
- V13 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- if (V12=="\x02" && V13 =="\x02" && V14 =="\x02")
- {
- Mi2 = 1;
- }
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V13 != "M")
- {
- goto Ra2;
- }
- }
- if (R2 == 14)
- {
- if (V14 == "N")
- {
- Spot = "N";
- V14 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- if (V12=="\x02" && V13 =="\x02" && V14 =="\x02")
- {
- Mi2 = 1;
- }
- if (V14=="\x02" && V15 =="\x02" && V16 =="\x02")
- {
- Mi2 = 1;
- }
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V14 != "N")
- {
- goto Ra2;
- }
- }
- if (R2 == 15)
- {
- if (V15 == "O")
- {
- Spot = "O";
- V15 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- if (V14=="\x02" && V15 =="\x02" && V16 =="\x02")
- {
- Mi2 = 1;
- }
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V15 != "O")
- {
- goto Ra2;
- }
- }
- if (R2 == 16)
- {
- if (V16 == "P")
- {
- Spot = "P";
- V16 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- if (V10=="\x02" && V9 =="\x02" && V16 =="\x02")
- {
- Mi2 = 1;
- }
- if (V14=="\x02" && V15 =="\x02" && V16 =="\x02")
- {
- Mi2 = 1;
- }
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V16 != "P")
- {
- goto Ra2;
- }
- }
- }
- if (N2 <= 5) //check if two together to block/make mill ELSE 4/5 - Randomizer / <4 make 2 pair if both sides open else go to Ra2
- {
- //MAKE MILL 24 combos
- if (V1 == "\x02" && V2 == "\x02" && V3 == "C") //ABC - 123
- {//AB
- Spot = "C";
- V3 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V2 == "\x02" && V3 == "\x02" && V1 == "A")
- {//BC
- Spot = "A";
- V1 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V1 == "\x02" && V3 == "\x02" && V2 == "B")
- {//AC
- Spot = "B";
- V2 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V3 == "\x02" && V4 == "\x02" && V5 == "E")//CDE - 345
- {//CD
- Spot = "E";
- V5 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V4 == "\x02" && V5 == "\x02" && V3 == "C")
- {//DE
- Spot = "C";
- V3 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V3 == "\x02" && V5 == "\x02" && V4 == "D")
- {//CE
- Spot = "D";
- V4 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V5 == "\x02" && V6 == "\x02" && V7 == "G") //EFG - 567
- {//EF
- Spot = "G";
- V7 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V6 == "\x02" && V7 == "\x02" && V5 == "E")
- {//FG
- Spot = "E";
- V5 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V5 == "\x02" && V7 == "\x02" && V6 == "F")
- {//EG
- Spot = "F";
- V6 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V1 == "\x02" && V8 == "\x02" && V7 == "G") //AHG - 187
- {//AH
- Spot = "G";
- V7 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V7 == "\x02" && V8 == "\x02" && V1 == "A")
- {//HG
- Spot = "A";
- V1 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V1 == "\x02" && V7 == "\x02" && V8 == "H")
- {//AG
- Spot = "H";
- V8 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 == "\x02" && V9 == "\x02" && V16 == "P") //JIP 10-9-16
- {//JI
- Spot = "P";
- V16 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V9 == "\x02" && V16 == "\x02" && V10 == "J")
- {//IP
- Spot = "J";
- V10 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 == "\x02" && V16 == "\x02" && V9 == "I")
- {//JP
- Spot = "I";
- V9 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 == "\x02" && V11 == "\x02" && V12 == "L") //JKL 10-11-12
- {//JK
- Spot = "L";
- V12 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V11 == "\x02" && V12 == "\x02" && V10 == "J")
- {//KL
- Spot = "J";
- V10 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 == "\x02" && V12 == "\x02" && V11 == "K")
- {//JL
- Spot = "K";
- V11 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V12 == "\x02" && V13 == "\x02" && V14 == "N") //LMN 12-13-14
- {//LM
- Spot = "N";
- V14 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V13 == "\x02" && V14 == "\x02" && V12 == "L")
- {//MN
- Spot = "L";
- V12 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V12 == "\x02" && V14 == "\x02" && V13 == "M")
- {//LN
- Spot = "M";
- V13 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V14 == "\x02" && V15 == "\x02" && V16 == "P") //NOP 14-15-16
- {//NO
- Spot = "P";
- V16 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V15 == "\x02" && V16 == "\x02" && V14 == "N")
- {//OP
- Spot = "N";
- V14 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V14 == "\x02" && V16 == "\x02" && V15 == "O")
- {//NP
- Spot = "O";
- V15 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- Mi2 = 1;
- system("cls");
- system("cls");
- goto Board2;
- }
- //else BLOCK MILL 24combos
- if (V1 == "\x01" && V2 == "\x01" && V3 == "C") //ABC - 123
- {//AB
- Spot = "C";
- V3 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V2 == "\x01" && V3 == "\x01" && V1 == "A")
- {//BC
- Spot = "A";
- V1 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V1 == "\x01" && V3 == "\x01" && V2 == "B")
- {//AC
- Spot = "B";
- V2 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V3 == "\x01" && V4 == "\x01" && V5 == "E")//CDE - 345
- {//CD
- Spot = "E";
- V5 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V4 == "\x01" && V5 == "\x01" && V3 == "C")
- {//DE
- Spot = "C";
- V3 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V3 == "\x01" && V5 == "\x01" && V4 == "D")
- {//CE
- Spot = "D";
- V4 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V5 == "\x01" && V6 == "\x01" && V7 == "G") //EFG - 567
- {//EF
- Spot = "G";
- V7 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V6 == "\x01" && V7 == "\x01" && V5 == "E")
- {//FG
- Spot = "E";
- V5 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V5 == "\x01" && V7 == "\x01" && V6 == "F")
- {//EG
- Spot = "F";
- V6 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V1 == "\x01" && V8 == "\x01" && V7 == "G") //AHG - 187
- {//AH
- Spot = "G";
- V7 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V7 == "\x01" && V8 == "\x01" && V1 == "A")
- {//HG
- Spot = "A";
- V1 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V1 == "\x01" && V7 == "\x01" && V8 == "H")
- {//AG
- Spot = "H";
- V8 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 == "\x01" && V9 == "\x01" && V16 == "P") //JIP 10-9-16
- {//JI
- Spot = "P";
- V16 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V9 == "\x01" && V16 == "\x01" && V10 == "J")
- {//IP
- Spot = "J";
- V10 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 == "\x01" && V16 == "\x01" && V9 == "I")
- {//JP
- Spot = "I";
- V9 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 == "\x01" && V11 == "\x01" && V12 == "L") //JKL 10-11-12
- {//JK
- Spot = "L";
- V12 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V11 == "\x01" && V12 == "\x01" && V10 == "J")
- {//KL
- Spot = "J";
- V10 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V10 == "\x01" && V12 == "\x01" && V11 == "K")
- {//JL
- Spot = "K";
- V11 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V12 == "\x01" && V13 == "\x01" && V14 == "N") //LMN 12-13-14
- {//LM
- Spot = "N";
- V14 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V13 == "\x01" && V14 == "\x01" && V12 == "L")
- {//MN
- Spot = "L";
- V12 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V12 == "\x01" && V14 == "\x01" && V13 == "M")
- {//LN
- Spot = "M";
- V13 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V14 == "\x01" && V15 == "\x01" && V16 == "P") //NOP 14-15-16
- {//NO
- Spot = "P";
- V16 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V15 == "\x01" && V16 == "\x01" && V14 == "N")
- {//OP
- Spot = "N";
- V14 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (V14 == "\x01" && V16 == "\x01" && V15 == "O")
- {//NP
- Spot = "O";
- V15 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- //ELSE 4/5 then randomizer
- if (N2 == 5 || N2 == 4)
- {
- goto Ra2;
- }
- //else MAKE 2 PAIR
- int Ran;
- srand((unsigned)time(0));//randomizer if make 2 pair or Ra2
- Ran = (rand()%3) +1; //1-3
- if (Ran == 1 || Ran >= 3)
- {
- if (V1== "\x02" && V2 == "B" && V3 == "C") //ABC 123
- {
- int R3;
- srand((unsigned)time(0));//randomizer
- R3 = (rand()%2) +1; //1-2
- if (R3 == 1)
- {//B
- Spot = "B";
- V2 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (R3 == 2)
- {//C
- Spot = "C";
- V3 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- }
- if (V2== "\x02" && V1 == "A" && V3 == "C")
- {
- int R4;
- srand((unsigned)time(0));//randomizer
- R4 = (rand()%2) +1; //1-2
- if (R4 == 1)
- {//A
- Spot = "A";
- V1 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (R4 == 2)
- {//C
- Spot = "C";
- V3 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- }
- if (V3== "\x02" && V1 == "A" && V2 == "B")
- {
- int R5;
- srand((unsigned)time(0));//randomizer
- R5 = (rand()%2) +1; //1-2
- if (R5 == 1)
- {//A
- Spot = "A";
- V1 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (R5 == 2)
- {//B
- Spot = "B";
- V2 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- }
- if (V1== "\x02" && V8 == "H" && V7 == "G") //AHG 187
- {
- int R6;
- srand((unsigned)time(0));//randomizer
- R6 = (rand()%2) +1; //1-2
- if (R6 == 1)
- {//H
- Spot = "H";
- V8 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (R6 == 2)
- {//G
- Spot = "G";
- V7 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- }
- if (V8== "\x02" && V1 == "A" && V7 == "G")
- {
- int R7;
- srand((unsigned)time(0));//randomizer
- R7 = (rand()%2) +1; //1-2
- if (R7 == 1)
- {//A
- Spot = "A";
- V1 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (R7 == 2)
- {//G
- Spot = "G";
- V7 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- }
- if (V7== "\x02" && V8 == "H" && V1 == "A")
- {
- int R8;
- srand((unsigned)time(0));//randomizer
- R8 = (rand()%2) +1; //1-2
- if (R8 == 1)
- {//H
- Spot = "H";
- V8 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (R8 == 2)
- {//A
- Spot = "A";
- V1 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- }
- if (V3== "\x02" && V4 == "D" && V5 == "E") //CDE 345
- {
- int R9;
- srand((unsigned)time(0));//randomizer
- R9 = (rand()%2) +1; //1-2
- if (R9 == 1)
- {//D
- Spot = "D";
- V4 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (R9 == 2)
- {//E
- Spot = "E";
- V5 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- }
- if (V4== "\x02" && V3 == "C" && V5 == "E")
- {
- int R10;
- srand((unsigned)time(0));//randomizer
- R10 = (rand()%2) +1; //1-2
- if (R10 == 1)
- {//C
- Spot = "C";
- V3 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (R10 == 2)
- {//E
- Spot = "E";
- V5 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- }
- if (V5== "\x02" && V4 == "D" && V3 == "C")
- {
- int R11;
- srand((unsigned)time(0));//randomizer
- R11 = (rand()%2) +1; //1-2
- if (R11 == 1)
- {//D
- Spot = "D";
- V4 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (R11 == 2)
- {//C
- Spot = "C";
- V3 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- }
- if (V5== "\x02" && V6 == "F" && V7 == "G") //EFG 567
- {
- int R12;
- srand((unsigned)time(0));//randomizer
- R12 = (rand()%2) +1; //1-2
- if (R12 == 1)
- {//F
- Spot = "F";
- V6 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (R12 == 2)
- {//G
- Spot = "G";
- V7 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- }
- if (V6== "\x02" && V5 == "E" && V7 == "G")
- {
- int R13;
- srand((unsigned)time(0));//randomizer
- R13 = (rand()%2) +1; //1-2
- if (R13 == 1)
- {//E
- Spot = "E";
- V5 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (R13 == 2)
- {//G
- Spot = "G";
- V7 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- }
- if (V7== "\x02" && V6 == "F" && V5 == "E")
- {
- int R14;
- srand((unsigned)time(0));//randomizer
- R14 = (rand()%2) +1; //1-2
- if (R14 == 1)
- {//F
- Spot = "F";
- V6 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (R14 == 2)
- {//E
- Spot = "E";
- V5 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- }
- if (V10== "\x02" && V9 == "I" && V16 == "P") //JIP 10-9-16
- {
- int R15;
- srand((unsigned)time(0));//randomizer
- R15 = (rand()%2) +1; //1-2
- if (R15 == 1)
- {//I
- Spot = "I";
- V9 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (R15 == 2)
- {//P
- Spot = "P";
- V16 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- }
- if (V9== "\x02" && V10 == "J" && V16 == "P")
- {
- int R16;
- srand((unsigned)time(0));//randomizer
- R16 = (rand()%2) +1; //1-2
- if (R16 == 1)
- {//J
- Spot = "J";
- V10 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (R16 == 2)
- {//P
- Spot = "P";
- V16 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- }
- if (V16== "\x02" && V9 == "I" && V10 == "J")
- {
- int R17;
- srand((unsigned)time(0));//randomizer
- R17 = (rand()%2) +1; //1-2
- if (R17 == 1)
- {//I
- Spot = "I";
- V9 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (R17 == 2)
- {//J
- Spot = "J";
- V10 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- }
- if (V10== "\x02" && V11 == "K" && V12 == "L") //JKL 10-11-12
- {
- int R18;
- srand((unsigned)time(0));//randomizer
- R18 = (rand()%2) +1; //1-2
- if (R18 == 1)
- {//K
- Spot = "K";
- V11 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (R18 == 2)
- {//L
- Spot = "L";
- V12 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- }
- if (V11== "\x02" && V10 == "J" && V12 == "L")
- {
- int R19;
- srand((unsigned)time(0));//randomizer
- R19 = (rand()%2) +1; //1-2
- if (R19 == 1)
- {//J
- Spot = "J";
- V10 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (R19 == 2)
- {//L
- Spot = "L";
- V12 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- }
- if (V12== "\x02" && V11 == "K" && V10 == "J")
- {
- int R20;
- srand((unsigned)time(0));//randomizer
- R20 = (rand()%2) +1; //1-2
- if (R20 == 1)
- {//K
- Spot = "K";
- V11 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (R20 == 2)
- {//J
- Spot = "J";
- V10 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- }
- if (V12== "\x02" && V13 == "M" && V14 == "N") //LMN 12-13-14
- {
- int R21;
- srand((unsigned)time(0));//randomizer
- R21 = (rand()%2) +1; //1-2
- if (R21 == 1)
- {//M
- Spot = "M";
- V13 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (R21 == 2)
- {//N
- Spot = "N";
- V14 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- }
- if (V13== "\x02" && V12 == "L" && V14 == "N")
- {
- int R22;
- srand((unsigned)time(0));//randomizer
- R22 = (rand()%2) +1; //1-2
- if (R22 == 1)
- {//L
- Spot = "L";
- V12 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (R22 == 2)
- {//N
- Spot = "N";
- V14 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- }
- if (V14== "\x02" && V13 == "M" && V12 == "L")
- {
- int R23;
- srand((unsigned)time(0));//randomizer
- R23 = (rand()%2) +1; //1-2
- if (R23 == 1)
- {//M
- Spot = "M";
- V13 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (R23 == 2)
- {//L
- Spot = "L";
- V12 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- }
- if (V14== "\x02" && V15 == "O" && V16 == "P") //NOP 14-15-16
- {
- int R24;
- srand((unsigned)time(0));//randomizer
- R24 = (rand()%2) +1; //1-2
- if (R24 == 1)
- {//O
- Spot = "O";
- V15 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (R24 == 2)
- {//P
- Spot = "P";
- V16 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- }
- if (V15== "\x02" && V14 == "N" && V16 == "P")
- {
- int R25;
- srand((unsigned)time(0));//randomizer
- R25 = (rand()%2) +1; //1-2
- if (R25 == 1)
- {//N
- Spot = "N";
- V14 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (R25 == 2)
- {//P
- Spot = "P";
- V16 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- }
- if (V16== "\x02" && V15 == "O" && V14 == "N")
- {
- int R26;
- srand((unsigned)time(0));//randomizer
- R26 = (rand()%2) +1; //1-2
- if (R26 == 1)
- {//O
- Spot = "O";
- V15 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- if (R26 == 2)
- {//N
- Spot = "N";
- V14 = "\x02";
- Val = "\x01";
- N2 = N2 -1;
- system("cls");
- system("cls");
- goto Board2;
- }
- }
- if (N2 < 4)
- {
- goto Ra2;
- }
- }
- if (Ran == 2)
- {
- goto Ra2;
- }
- }
- }
- //Player places pieces
- if ((Move == "A" || Move == "a") && V1 == "A" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V1 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V1=="\x01" && V2 =="\x01" && V3 =="\x01")
- {
- Mill = 1;
- }
- if (V1=="\x01" && V8 =="\x01" && V7 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- }
- if ((Move == "A" || Move == "a") && V1 != "A" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((Move == "B" || Move == "b") && V2 == "B" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V2 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V1=="\x01" && V2 =="\x01" && V3 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- }
- if ((Move == "B" || Move == "b") && V2 != "B" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((Move == "C" || Move == "c") && V3 == "C" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V3 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V1=="\x01" && V2 =="\x01" && V3 =="\x01")
- {
- Mill = 1;
- }
- if (V3=="\x01" && V4 =="\x01" && V5 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- }
- if ((Move == "C" || Move == "c") && V3 != "C" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((Move == "D" || Move == "d") && V4 == "D" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V4 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V3=="\x01" && V4 =="\x01" && V5 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- }
- if ((Move == "D" || Move == "d") && V4 != "D" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((Move == "E" || Move == "e") && V5 == "E" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V5 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V3=="\x01" && V4 =="\x01" && V5 =="\x01")
- {
- Mill = 1;
- }
- if (V5=="\x01" && V6 =="\x01" && V7 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- }
- if ((Move == "E" || Move == "e") && V5 != "E" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((Move == "F" || Move == "f") && V6 == "F" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V6 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V5=="\x01" && V6 =="\x01" && V7 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- }
- if ((Move == "F" || Move == "f") && V6 != "F" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((Move == "G" || Move == "g") && V7 == "G" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V7 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V1=="\x01" && V8 =="\x01" && V7 =="\x01")
- {
- Mill = 1;
- }
- if (V5=="\x01" && V6 =="\x01" && V7 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- }
- if ((Move == "G" || Move == "g") && V7 != "G" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((Move == "H" || Move == "h") && V8 == "H" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V8 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V1=="\x01" && V8 =="\x01" && V7 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- }
- if ((Move == "H" || Move == "h") && V8 != "H" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((Move == "I" || Move == "i") && V9 == "I" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V9 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V10=="\x01" && V9 =="\x01" && V16 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- }
- if ((Move == "I" || Move == "i") && V9 != "I" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((Move == "J" || Move == "j") && V10 == "J" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V10 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V10=="\x01" && V11 =="\x01" && V12 =="\x01")
- {
- Mill = 1;
- }
- if (V10=="\x01" && V9 =="\x01" && V16 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- }
- if ((Move == "J" || Move == "j") && V10 != "J" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((Move == "K" || Move == "k") && V11 == "K" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V11 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V10=="\x01" && V11 =="\x01" && V12 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- }
- if ((Move == "K" || Move == "k") && V11 != "K" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((Move == "L" || Move == "l") && V12 == "L" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V12 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V10=="\x01" && V11 =="\x01" && V12 =="\x01")
- {
- Mill = 1;
- }
- if (V12=="\x01" && V13 =="\x01" && V14 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- }
- if ((Move == "L" || Move == "l") && V12 != "L" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((Move == "M" || Move == "m") && V13 == "M" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V13 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V12=="\x01" && V13 =="\x01" && V14 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- }
- if ((Move == "M" || Move == "m") && V13 != "M" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((Move == "N" || Move == "n") && V14 == "N" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V14 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V12=="\x01" && V13 =="\x01" && V14 =="\x01")
- {
- Mill = 1;
- }
- if (V14=="\x01" && V15 =="\x01" && V16 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- }
- if ((Move == "N" || Move == "n") && V14 != "N" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((Move == "O" || Move == "o") && V15 == "O" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V15 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V14=="\x01" && V15 =="\x01" && V16 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- }
- if ((Move == "O" || Move == "o") && V15 != "O" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((Move == "P" || Move == "p") && V16 == "P" && (N1 > 0 || N2 > 0))
- {
- if ( Val == "\x01")
- {
- V16 = "\x01";
- Val = "\x02";
- N1 = N1 - 1;
- if (V14=="\x01" && V15 =="\x01" && V16 =="\x01")
- {
- Mill = 1;
- }
- if (V10=="\x01" && V9 =="\x01" && V16 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- }
- if ((Move == "P" || Move == "p") && V16 != "P" && (N1 > 0 || N2 > 0))
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- //Outer board move code
- //Player move pieces A to b or h
- if ((M2 == "A" || M2 == "a") && V1 != "A")
- {
- if ((M3 == "B" || M3 == "b") && V2 == "B")
- {
- if ( Val == "\x01" && V1 == "\x01")
- {
- V2 = "\x01";
- V1 = "A";
- Val = "\x02";
- goto Board2;
- }
- if ( Val == "\x01" && V1 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "B" || M3 == "b") && V2 != "B")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 == "H" || M3 == "h") && V8 == "H")
- {
- if ( Val == "\x01" && V1 == "\x01")
- {
- V8 = "\x01";
- V1 = "A";
- Val = "\x02";
- goto Board2;
- }
- if ( Val == "\x01" && V1 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "H" || M3 == "h") && V8 != "H")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 != "B" || M3 != "b") || (M3 != "H" || M3 !="h"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M2 == "A" || M2 =="a") && V1 == "A")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- //Move from B to c a k
- if ((M2 == "B" || M2 == "b") && V2 != "B")
- {
- if ((M3 == "C" || M3 == "c") && V3 == "C")
- {
- if ( Val == "\x01" && V2 == "\x01")
- {
- V3 = "\x01";
- V2 = "B";
- Val = "\x02";
- if (V3=="\x01" && V4 =="\x01" && V5 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- if ( Val == "\x01" && V2 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "C" || M3 == "c") && V3 != "C")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 == "A" || M3 == "a") && V1 == "A")
- {
- if ( Val == "\x01" && V2 == "\x01")
- {
- V1 = "\x01";
- V2 = "B";
- Val = "\x02";
- if (V1=="\x01" && V8 =="\x01" && V7 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- if ( Val == "\x01" && V2 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "A" || M3 == "a") && V1 != "A")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 == "K" || M3 == "k") && V11 == "K")
- {
- if ( Val == "\x01" && V2 == "\x01")
- {
- V11 = "\x01";
- V2 = "B";
- Val = "\x02";
- if (V10=="\x01" && V11 =="\x01" && V12 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- if ( Val == "\x01" && V2 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "K" || M3 == "k") && V11 != "K")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 != "A" || M3 != "a") || (M3 != "C" || M3 !="c") || (M3 != "K" || M3 != "k"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M2 == "B" || M2 =="b") && V2 == "B")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- //Move C to b d
- if ((M2 == "C" || M2 == "c") && V3 != "C")
- {
- if ((M3 == "B" || M3 == "b") && V2 == "B")
- {
- if ( Val == "\x01" && V3 == "\x01")
- {
- V2 = "\x01";
- V3 = "C";
- Val = "\x02";
- goto Board2;
- }
- if ( Val == "\x01" && V3 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "C" || M3 == "c") && V3 != "C")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 == "D" || M3 == "d") && V4 == "D")
- {
- if ( Val == "\x01" && V3 == "\x01")
- {
- V4 = "\x01";
- V3 = "C";
- Val = "\x02";
- goto Board2;
- }
- if ( Val == "\x01" && V3 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "D" || M3 == "d") && V4 != "D")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 != "B" || M3 != "b") || (M3 != "D" || M3 !="d"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M2 == "C" || M2 =="c") && V3 == "C")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- //Move D to c e m
- if ((M2 == "D" || M2 == "d") && V4 != "D")
- {
- if ((M3 == "C" || M3 == "c") && V3 == "C")
- {
- if ( Val == "\x01" && V4 == "\x01")
- {
- V3 = "\x01";
- V4 = "D";
- Val = "\x02";
- if (V1=="\x01" && V2 =="\x01" && V3 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- if ( Val == "\x01" && V4 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "C" || M3 == "c") && V3 != "C")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 == "E" || M3 == "e") && V5 == "E")
- {
- if ( Val == "\x01" && V4 == "\x01")
- {
- V5 = "\x01";
- V4 = "D";
- Val = "\x02";
- if (V5=="\x01" && V6 =="\x01" && V7 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- if ( Val == "\x01" && V4 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "E" || M3 == "e") && V5 != "E")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 == "M" || M3 == "m") && V13 == "M")
- {
- if ( Val == "\x01" && V4 == "\x01")
- {
- V13 = "\x01";
- V4 = "D";
- Val = "\x02";
- if (V12=="\x01" && V13 =="\x01" && V14 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- if ( Val == "\x01" && V4 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "M" || M3 == "m") && V13 != "M")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 != "C" || M3 != "c") || (M3 != "E" || M3 !="e") || (M3 != "M" || M3 != "m"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M2 == "D" || M2 =="d") && V4 == "D")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- //Move E to d or f
- if ((M2 == "E" || M2 == "e") && V5 != "E")
- {
- if ((M3 == "D" || M3 == "d") && V4 == "D")
- {
- if ( Val == "\x01" && V5 == "\x01")
- {
- V4 = "\x01";
- V5 = "E";
- Val = "\x02";
- goto Board2;
- }
- if ( Val == "\x01" && V5 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "D" || M3 == "d") && V4 != "D")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 == "F" || M3 == "f") && V6 == "F")
- {
- if ( Val == "\x01" && V5 == "\x01")
- {
- V6 = "\x01";
- V5 = "E";
- Val = "\x02";
- goto Board2;
- }
- if ( Val == "\x01" && V5 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "F" || M3 == "f") && V6 != "F")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 != "D" || M3 != "d") || (M3 != "F" || M3 !="f"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M2 == "E" || M2 =="e") && V5 == "E")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- //move F to e o g
- if ((M2 == "F" || M2 == "f") && V6 != "F")
- {
- if ((M3 == "E" || M3 == "e") && V5 == "E")
- {
- if ( Val == "\x01" && V6 == "\x01")
- {
- V5 = "\x01";
- V6 = "F";
- Val = "\x02";
- if (V3=="\x01" && V4 =="\x01" && V5 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- if ( Val == "\x01" && V6 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "E" || M3 == "e") && V5 != "E")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 == "o" || M3 == "O") && V15 == "O")
- {
- if ( Val == "\x01" && V6 == "\x01")
- {
- V15 = "\x01";
- V6 = "F";
- Val = "\x02";
- if (V14=="\x01" && V15 =="\x01" && V16 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- if ( Val == "\x01" && V6 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "O" || M3 == "o") && V15 != "O")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 == "G" || M3 == "g") && V7 == "G")
- {
- if ( Val == "\x01" && V6 == "\x01")
- {
- V7 = "\x01";
- V6 = "F";
- Val = "\x02";
- if (V1=="\x01" && V8 =="\x01" && V7 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- if ( Val == "\x01" && V6 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "G" || M3 == "g") && V7 != "G")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 != "E" || M3 != "e") || (M3 != "O" || M3 !="o") || (M3 != "G" || M3 != "g"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M2 == "F" || M2 =="f") && V6 == "F")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- //Move G to F H
- if ((M2 == "G" || M2 == "g") && V7 != "G")
- {
- if ((M3 == "F" || M3 == "f") && V6 == "F")
- {
- if ( Val == "\x01" && V7 == "\x01")
- {
- V6 = "\x01";
- V7 = "G";
- Val = "\x02";
- goto Board2;
- }
- if ( Val == "\x01" && V7 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "F" || M3 == "f") && V6 != "F")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 == "H" || M3 == "h") && V8 == "H")
- {
- if ( Val == "\x01" && V7 == "\x01")
- {
- V8 = "\x01";
- V7 = "G";
- Val = "\x02";
- goto Board2;
- }
- if ( Val == "\x01" && V7 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "H" || M3 == "h") && V8 != "H")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 != "F" || M3 != "f") || (M3 != "H" || M3 !="h"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M2 == "G" || M2 =="g") && V7 == "G")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- //Move H to a g i
- if ((M2 == "H" || M2 == "h") && V8 != "H")
- {
- if ((M3 == "A" || M3 == "a") && V1 == "A")
- {
- if ( Val == "\x01" && V8 == "\x01")
- {
- V1 = "\x01";
- V8 = "H";
- Val = "\x02";
- if (V1=="\x01" && V2 =="\x01" && V3 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- if ( Val == "\x01" && V8 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "A" || M3 == "a") && V1 != "A")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 == "g" || M3 == "G") && V7 == "G")
- {
- if ( Val == "\x01" && V8 == "\x01")
- {
- V7 = "\x01";
- V8 = "H";
- Val = "\x02";
- if (V5=="\x01" && V6 =="\x01" && V7 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- if ( Val == "\x01" && V8 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "G" || M3 == "g") && V7 != "G")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 == "I" || M3 == "i") && V9 == "I")
- {
- if ( Val == "\x01" && V8 == "\x01")
- {
- V9 = "\x01";
- V8 = "H";
- Val = "\x02";
- if (V10=="\x01" && V9 =="\x01" && V16 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- if ( Val == "\x01" && V8 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "I" || M3 == "i") && V9 != "I")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 != "A" || M3 != "a") || (M3 != "G" || M3 !="g") || (M3 != "I" || M3 != "i"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M2 == "H" || M2 =="h") && V8 == "H")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- //Inner board move code
- //move I to h j p
- if ((M2 == "I" || M2 == "i") && V9 != "I")
- {
- if ((M3 == "H" || M3 == "h") && V8 == "H")
- {
- if ( Val == "\x01" && V9 == "\x01")
- {
- V8 = "\x01";
- V9 = "I";
- Val = "\x02";
- if (V1=="\x01" && V8 =="\x01" && V7 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- if ( Val == "\x01" && V9 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "H" || M3 == "h") && V8 != "H")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 == "J" || M3 == "j") && V10 == "J")
- {
- if ( Val == "\x01" && V9 == "\x01")
- {
- V10 = "\x01";
- V9 = "I";
- Val = "\x02";
- if (V10=="\x01" && V11 =="\x01" && V12 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- if ( Val == "\x01" && V9 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "J" || M3 == "j") && V10 != "J")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 == "P" || M3 == "p") && V16 == "P")
- {
- if ( Val == "\x01" && V9 == "\x01")
- {
- V16 = "\x01";
- V9 = "I";
- Val = "\x02";
- if (V14=="\x01" && V15 =="\x01" && V16 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- if ( Val == "\x01" && V9 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "P" || M3 == "p") && V16 != "P")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 != "H" || M3 != "h") || (M3 != "J" || M3 !="j") || (M3 != "P" || M3 != "p"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M2 == "I" || M2 =="i") && V9 == "I")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- //MOVE J TO I K
- if ((M2 == "J" || M2 == "j") && V10 != "J")
- {
- if ((M3 == "I" || M3 == "i") && V9 == "I")
- {
- if ( Val == "\x01" && V10 == "\x01")
- {
- V9 = "\x01";
- V10 = "J";
- Val = "\x02";
- goto Board2;
- }
- if ( Val == "\x01" && V10 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "I" || M3 == "i") && V9 != "I")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 == "K" || M3 == "k") && V11 == "K")
- {
- if ( Val == "\x01" && V10 == "\x01")
- {
- V11 = "\x01";
- V10 = "J";
- Val = "\x02";
- goto Board2;
- }
- if ( Val == "\x01" && V10 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "K" || M3 == "k") && V11 != "K")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 != "I" || M3 != "i") || (M3 != "K" || M3 !="k"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M2 == "J" || M2 =="j") && V10 == "J")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- //MOVE K TO j l b
- if ((M2 == "K" || M2 == "k") && V11 != "K")
- {
- if ((M3 == "L" || M3 == "l") && V12 == "L")
- {
- if ( Val == "\x01" && V11 == "\x01")
- {
- V12 = "\x01";
- V11 = "K";
- Val = "\x02";
- if (V12=="\x01" && V13 =="\x01" && V14 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- if ( Val == "\x01" && V11 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "L" || M3 == "l") && V12 != "L")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 == "J" || M3 == "j") && V10 == "J")
- {
- if ( Val == "\x01" && V11 == "\x01")
- {
- V10 = "\x01";
- V11 = "K";
- Val = "\x02";
- if (V10=="\x01" && V9 =="\x01" && V16 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- if ( Val == "\x01" && V11 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "J" || M3 == "j") && V10 != "J")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 == "B" || M3 == "b") && V2 == "B")
- {
- if ( Val == "\x01" && V11 == "\x01")
- {
- V2 = "\x01";
- V11 = "K";
- Val = "\x02";
- if (V1=="\x01" && V2 =="\x01" && V3 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- if ( Val == "\x01" && V11 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "B" || M3 == "b") && V2 != "B")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 != "L" || M3 != "l") || (M3 != "J" || M3 !="j") || (M3 != "B" || M3 != "b"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M2 == "K" || M2 =="k") && V11 == "K")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- //MOVE L TO k m
- if ((M2 == "L" || M2 == "l") && V12 != "L")
- {
- if ((M3 == "M" || M3 == "m") && V13 == "M")
- {
- if ( Val == "\x01" && V12 == "\x01")
- {
- V13 = "\x01";
- V12 = "L";
- Val = "\x02";
- goto Board2;
- }
- if ( Val == "\x01" && V12 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "M" || M3 == "m") && V13 != "M")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 == "K" || M3 == "k") && V11 == "K")
- {
- if ( Val == "\x01" && V12 == "\x01")
- {
- V11 = "\x01";
- V12 = "L";
- Val = "\x02";
- goto Board2;
- }
- if ( Val == "\x01" && V12 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "K" || M3 == "k") && V11 != "K")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 != "M" || M3 != "m") || (M3 != "K" || M3 !="k"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M2 == "L" || M2 =="l") && V12 == "L")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- //MOVE M TO l d n
- if ((M2 == "M" || M2 == "m") && V13 != "M")
- {
- if ((M3 == "L" || M3 == "l") && V12 == "L")
- {
- if ( Val == "\x01" && V13 == "\x01")
- {
- V12 = "\x01";
- V13 = "M";
- Val = "\x02";
- if (V10=="\x01" && V11 =="\x01" && V12 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- if ( Val == "\x01" && V13 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "L" || M3 == "l") && V12 != "L")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 == "D" || M3 == "d") && V4 == "D")
- {
- if ( Val == "\x01" && V13 == "\x01")
- {
- V4 = "\x01";
- V13 = "M";
- Val = "\x02";
- if (V3=="\x01" && V4 =="\x01" && V5 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- if ( Val == "\x01" && V13 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "D" || M3 == "d") && V4 != "D")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 == "N" || M3 == "n") && V14 == "N")
- {
- if ( Val == "\x01" && V13 == "\x01")
- {
- V14 = "\x01";
- V13 = "M";
- Val = "\x02";
- if (V14=="\x01" && V15 =="\x01" && V16 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- if ( Val == "\x01" && V13 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "N" || M3 == "n") && V14 != "N")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 != "L" || M3 != "l") || (M3 != "D" || M3 !="d") || (M3 != "N" || M3 != "n"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M2 == "M" || M2 =="m") && V13 == "M")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- //MOVE N TO m o
- if ((M2 == "N" || M2 == "n") && V14 != "N")
- {
- if ((M3 == "M" || M3 == "m") && V13 == "M")
- {
- if ( Val == "\x01" && V14 == "\x01")
- {
- V13 = "\x01";
- V14 = "N";
- Val = "\x02";
- goto Board2;
- }
- if ( Val == "\x01" && V14 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "M" || M3 == "m") && V13 != "M")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 == "O" || M3 == "o") && V15 == "O")
- {
- if ( Val == "\x01" && V14 == "\x01")
- {
- V15 = "\x01";
- V14 = "N";
- Val = "\x02";
- goto Board2;
- }
- if ( Val == "\x01" && V14 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "O" || M3 == "o") && V15 != "O")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 != "M" || M3 != "m") || (M3 != "O" || M3 !="o"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M2 == "N" || M2 =="n") && V14 == "N")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- //MOE O TO n f p
- if ((M2 == "O" || M2 == "o") && V15 != "O")
- {
- if ((M3 == "F" || M3 == "f") && V6 == "F")
- {
- if ( Val == "\x01" && V15 == "\x01")
- {
- V6 = "\x01";
- V15 = "O";
- Val = "\x02";
- if (V5=="\x01" && V6 =="\x01" && V7 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- if ( Val == "\x01" && V15 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "F" || M3 == "f") && V6 != "F")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 == "P" || M3 == "p") && V16 == "P")
- {
- if ( Val == "\x01" && V15 == "\x01")
- {
- V16 = "\x01";
- V15 = "O";
- Val = "\x02";
- if (V10=="\x01" && V9 =="\x01" && V16 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- if ( Val == "\x01" && V15 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "P" || M3 == "p") && V16 != "P")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 == "N" || M3 == "n") && V14 == "N")
- {
- if ( Val == "\x01" && V15 == "\x01")
- {
- V14 = "\x01";
- V15 = "O";
- Val = "\x02";
- if (V12=="\x01" && V13 =="\x01" && V14 =="\x01")
- {
- Mill = 1;
- }
- goto Board2;
- }
- if ( Val == "\x01" && V15 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "N" || M3 == "n") && V14 != "N")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 != "F" || M3 != "f") || (M3 != "P" || M3 !="p") || (M3 != "N" || M3 != "n"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M2 == "O" || M2 =="o") && V15 == "O")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- //MOVE P to o i
- if ((M2 == "P" || M2 == "p") && V16 != "P")
- {
- if ((M3 == "I" || M3 == "i") && V9 == "I")
- {
- if ( Val == "\x01" && V16 == "\x01")
- {
- V9 = "\x01";
- V16 = "P";
- Val = "\x02";
- goto Board2;
- }
- if ( Val == "\x01" && V16 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "M" || M3 == "m") && V13 != "M")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 == "O" || M3 == "o") && V15 == "O")
- {
- if ( Val == "\x01" && V16 == "\x01")
- {
- V15 = "\x01";
- V16 = "P";
- Val = "\x02";
- goto Board2;
- }
- if ( Val == "\x01" && V16 != "\x01")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M3 == "O" || M3 == "o") && V15 != "O")
- {
- cout << " That spot is already taken. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- if ((M3 != "I" || M3 != "i") || (M3 != "O" || M3 !="o"))
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if ((M2 == "P" || M2 =="p") && V16 == "P")
- {
- cout << " Invalid move. \n";
- cout << " ";
- system("pause");
- goto Board2;
- }
- }
- if (Num1 == 3) //Instructions
- {
- cout << " \n";
- cout << " \n";
- cout << "Created by [redacted] \n";
- cout << " \n";
- cout << "How to play Six-Men's Morris: \n";
- cout << "Each player has 6 pieces to place on the board. \n";
- cout << "They take turns either placing a piece on the board or moving one on the board. You can only move a piece after you have placed all of your pieces.\n";
- cout << "Pieces can be placed either where the lines intersect or at corners where the \n";
- cout << "letters (A - P) are. \n";
- cout << "To capture one of the opponent's pieces, the player must have 3 pieces in \n";
- cout << "a row, which is called a mill, and then choose a piece to take.\n";
- cout << "When a player has less than 3 pieces left then the game is over and that player has lost.\n";
- cout << " \n";
- system("pause");
- system("cls");
- goto Start;
- }
- if (Num1 >= 4) //Exit
- {
- system("cls");
- return 0;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement