//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 << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << " ************************

";

cout << " \x02 Six-Men's Morris \x01

";

cout << " \x01 \x02

";

cout << " \x02 1) 2 Players \x01

";

cout << " \x02 2) Vs. Computer \x01

";

cout << " \x01 3) Help \x02

";

cout << " \x02 4) Exit \x01

";

cout << " \x01 \x02

";

cout << " ************************

";

cout << "

";

cout << " Make a selection: ";

cin >> Num1;

//\x01 black, x02 white piece

if (Num1 == 1)

{

system("cls");

cout << "

";

cout << "

";

cout << "

";

cout << "

"; //find who goes first

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << " To see who goes first:

";

cout << " ";

system("pause");

cout << "

";

srand((unsigned)time(0));//randomizer

R1 = (rand()%2) +1; //1-2

if (R1 == 1)

{

cout << " Player \x01 goes first.

";

Val = "\x01";

}

if (R1 >= 2)

{

cout << " Player \x02 goes first.

";

Val = "\x02";

}

cout << " ";

system("pause");

system("cls");

Board:

if (N1 < 0)

{

N1 = 0;

}

if (N2 < 0)

{

N2 = 0;

}

system("cls");

cout << "

";

cout << "

";

cout << " \x01 Six-Men's Morris \x02

";

cout << "

";

cout << " b

";

cout << "

";

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

";

cout << " \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3

";

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

";

cout << " \xb3 \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 k \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3 \xb3

";

cout << " h "<<V8<<"\xc4\xc4\xc4\xc4\xc4\xc4\xc4"<<V9<<" i m "<<V13<<"\xc4\xc4\xc4\xc4\xc4\xc4\xc4"<<V4<<" d

";

cout << " \xb3 \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 o \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3 \xb3

";

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

";

cout << " \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3

";

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

";

cout << "

";

cout << " f

";

cout << "

";

//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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap == "B" || Cap == "b")

{

if (V2 == "\x02")

{

V2 = "B";

goto A1;

}

if (V2 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap == "C" || Cap == "c")

{

if (V3 == "\x02")

{

V3 = "C";

goto A1;

}

if (V3 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap == "D" || Cap == "d")

{

if (V4 == "\x02")

{

V4 = "D";

goto A1;

}

if (V4 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap == "E" || Cap == "e")

{

if (V5 == "\x02")

{

V5 = "E";

goto A1;

}

if (V5 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap == "F" || Cap == "f")

{

if (V6 == "\x02")

{

V6 = "F";

goto A1;

}

if (V6 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap == "G" || Cap == "g")

{

if (V7 == "\x02")

{

V7 = "G";

goto A1;

}

if (V7 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap == "H" || Cap == "h")

{

if (V8 == "\x02")

{

V8 = "H";

goto A1;

}

if (V8 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap == "I" || Cap == "i")

{

if (V9 == "\x02")

{

V9 = "I";

goto A1;

}

if (V9 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap == "J" || Cap == "j")

{

if (V10 == "\x02")

{

V10 = "J";

goto A1;

}

if (V10 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap == "K" || Cap == "k")

{

if (V11 == "\x02")

{

V11 = "K";

goto A1;

}

if (V11 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap == "L" || Cap == "l")

{

if (V12 == "\x02")

{

V12 = "L";

goto A1;

}

if (V12 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap == "M" || Cap == "m")

{

if (V13 == "\x02")

{

V13 = "M";

goto A1;

}

if (V13 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap == "N" || Cap == "n")

{

if (V14 == "\x02")

{

V14 = "N";

goto A1;

}

if (V14 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap == "O" || Cap == "o")

{

if (V15 == "\x02")

{

V15 = "O";

goto A1;

}

if (V15 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap == "P" || Cap == "p")

{

if (V16 == "\x02")

{

V16 = "P";

goto A1;

}

if (V16 != "\x02")

{

cout << " Invalid move.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap2 == "B" || Cap2 == "b")

{

if (V2 == "\x01")

{

V2 = "B";

goto B1;

}

if (V2 != "\x01")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap2 == "C" || Cap2 == "c")

{

if (V3 == "\x01")

{

V3 = "C";

goto B1;

}

if (V3 != "\x01")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap2 == "D" || Cap2 == "d")

{

if (V4 == "\x01")

{

V4 = "D";

goto B1;

}

if (V4 != "\x01")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap2 == "E" || Cap2 == "e")

{

if (V5 == "\x01")

{

V5 = "E";

goto B1;

}

if (V5 != "\x01")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap2 == "F" || Cap2 == "f")

{

if (V6 == "\x01")

{

V6 = "F";

goto B1;

}

if (V6 != "\x01")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap2 == "G" || Cap2 == "g")

{

if (V7 == "\x01")

{

V7 = "G";

goto B1;

}

if (V7 != "\x01")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap2 == "H" || Cap2 == "h")

{

if (V8 == "\x01")

{

V8 = "H";

goto B1;

}

if (V8 != "\x01")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap2 == "I" || Cap2 == "i")

{

if (V9 == "\x01")

{

V9 = "I";

goto B1;

}

if (V9 != "\x01")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap2 == "J" || Cap2 == "j")

{

if (V10 == "\x01")

{

V10 = "J";

goto B1;

}

if (V10 != "\x01")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap2 == "K" || Cap2 == "k")

{

if (V11 == "\x01")

{

V11 = "K";

goto B1;

}

if (V11 != "\x01")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap2 == "L" || Cap2 == "l")

{

if (V12 == "\x01")

{

V12 = "L";

goto B1;

}

if (V12 != "\x01")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap2 == "M" || Cap2 == "m")

{

if (V13 == "\x01")

{

V13 = "M";

goto B1;

}

if (V13 != "\x01")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap2 == "N" || Cap2 == "n")

{

if (V14 == "\x01")

{

V14 = "N";

goto B1;

}

if (V14 != "\x01")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap2 == "O" || Cap2 == "o")

{

if (V15 == "\x01")

{

V15 = "O";

goto B1;

}

if (V15 != "\x01")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if (Cap2 == "P" || Cap2 == "p")

{

if (V16 == "\x01")

{

V16 = "P";

goto B1;

}

if (V16 != "\x01")

{

cout << " Invalid move.

";

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 << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << " \x02\x02\x02\x02\x02\x02\x02\x02\x02\x02

";

cout << " \x02 \x02

";

cout << " \x02 \x02 \x02 \x02

";

cout << " \x02 \x02\x02\x02 \x02\x02\x02 \x02

";

cout << " \x02 \x02 \x02 \x02

";

cout << " \x02 \x02

";

cout << " \x02 \x02 \x02 \x02

";

cout << " \x02 \x02 \x02 \x02

";

cout << " \x02 \x02\x02\x02\x02\x02\x02 \x02

";

cout << " \x02 \x02

";

cout << " \x02\x02\x02\x02\x02\x02\x02\x02\x02\x02

";

cout << "

";

cout << " Player \x02 wins.

";

cout << " Do you want to play again?

";

cout << " 1) Yes

"; //play again

cout << " 2) No

";

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 << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << " \x01\x01\x01\x01\x01\x01\x01\x01\x01\x01

";

cout << " \x01 \x01

";

cout << " \x01 \x01 \x01 \x01

";

cout << " \x01 \x01\x01\x01 \x01\x01\x01 \x01

";

cout << " \x01 \x01 \x01 \x01

";

cout << " \x01 \x01

";

cout << " \x01 \x01 \x01 \x01

";

cout << " \x01 \x01 \x01 \x01

";

cout << " \x01 \x01\x01\x01\x01\x01\x01 \x01

";

cout << " \x01 \x01

";

cout << " \x01\x01\x01\x01\x01\x01\x01\x01\x01\x01

";

cout << "

";

cout << " Player \x01 wins.

";

cout << " Do you want to play again?

";

cout << " 1) Yes

"; //play again

cout << " 2) No

";

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

";

cout << " \xba Moving: \xba Pieces Left: \xba

";

cout << " \xba \xba \x01 " <<Ct1<<" \xba

";

cout << " \xba "<<Val<<" \xba \xba

";

cout << " \xba \xba \x02 " <<Ct2<<" \xba

";

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

";

cout << "

";

}

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

";

cout << " \xba Moving: \xba Pieces Left: \xba Pieces Left to Place: \xba

";

cout << " \xba \xba \x01 " <<Ct1<<" \xba \x01 " <<N1<<" \xba

";

cout << " \xba "<<Val<<" \xba \xba \xba

";

cout << " \xba \xba \x02 " <<Ct2<<" \xba \x02 " <<N2<<" \xba

";

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

";

cout << "

";

}

}

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 << "

";

}

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 << "

";

}

if (N1 > 0 && Val == "\x01" && Mill < 1 && Mi2 < 1) //PLACE PIECES

{

cout << " "<<Dir<<" ";

cin >> Move;

cout << " "<<D2<<"

";

}

if (N2 > 0 && Val == "\x02" && Mill < 1 && Mi2 <1)

{

cout << " "<<Dir<<" ";

cin >> Move;

cout << " "<<D2<<"

";

}

//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.

";

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.

";

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.

";

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.

";

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.

";

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.

";

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.

";

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.

";

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.

";

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.

";

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.

";

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.

";

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.

";

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.

";

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.

";

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.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "B" || M3 == "b") && V2 != "B")

{

cout << " That spot is already taken.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "H" || M3 == "h") && V8 != "H")

{

cout << " That spot is already taken.

";

cout << " ";

system("pause");

goto Board;

}

if ((M3 != "B" || M3 != "b") || (M3 != "H" || M3 !="h"))

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M2 == "A" || M2 =="a") && V1 == "A")

{

cout << " Invalid move.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "C" || M3 == "c") && V3 != "C")

{

cout << " That spot is already taken.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "A" || M3 == "a") && V1 != "A")

{

cout << " That spot is already taken.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "K" || M3 == "k") && V11 != "K")

{

cout << " That spot is already taken.

";

cout << " ";

system("pause");

goto Board;

}

if ((M3 != "A" || M3 != "a") || (M3 != "C" || M3 !="c") || (M3 != "K" || M3 != "k"))

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M2 == "B" || M2 =="b") && V2 == "B")

{

cout << " Invalid move.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "C" || M3 == "c") && V3 != "C")

{

cout << " That spot is already taken.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "D" || M3 == "d") && V4 != "D")

{

cout << " That spot is already taken.

";

cout << " ";

system("pause");

goto Board;

}

if ((M3 != "B" || M3 != "b") || (M3 != "D" || M3 !="d"))

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M2 == "C" || M2 =="c") && V3 == "C")

{

cout << " Invalid move.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "C" || M3 == "c") && V3 != "C")

{

cout << " That spot is already taken.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "E" || M3 == "e") && V5 != "E")

{

cout << " That spot is already taken.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "M" || M3 == "m") && V13 != "M")

{

cout << " That spot is already taken.

";

cout << " ";

system("pause");

goto Board;

}

if ((M3 != "C" || M3 != "c") || (M3 != "E" || M3 !="e") || (M3 != "M" || M3 != "m"))

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M2 == "D" || M2 =="d") && V4 == "D")

{

cout << " Invalid move.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "D" || M3 == "d") && V4 != "D")

{

cout << " That spot is already taken.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "F" || M3 == "f") && V6 != "F")

{

cout << " That spot is already taken.

";

cout << " ";

system("pause");

goto Board;

}

if ((M3 != "D" || M3 != "d") || (M3 != "F" || M3 !="f"))

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M2 == "E" || M2 =="e") && V5 == "E")

{

cout << " Invalid move.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "E" || M3 == "e") && V5 != "E")

{

cout << " That spot is already taken.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "O" || M3 == "o") && V15 != "O")

{

cout << " That spot is already taken.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "G" || M3 == "g") && V7 != "G")

{

cout << " That spot is already taken.

";

cout << " ";

system("pause");

goto Board;

}

if ((M3 != "E" || M3 != "e") || (M3 != "O" || M3 !="o") || (M3 != "G" || M3 != "g"))

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M2 == "F" || M2 =="f") && V6 == "F")

{

cout << " Invalid move.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "F" || M3 == "f") && V6 != "F")

{

cout << " That spot is already taken.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "H" || M3 == "h") && V8 != "H")

{

cout << " That spot is already taken.

";

cout << " ";

system("pause");

goto Board;

}

if ((M3 != "F" || M3 != "f") || (M3 != "H" || M3 !="h"))

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M2 == "G" || M2 =="g") && V7 == "G")

{

cout << " Invalid move.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "A" || M3 == "a") && V1 != "A")

{

cout << " That spot is already taken.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "G" || M3 == "g") && V7 != "G")

{

cout << " That spot is already taken.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "I" || M3 == "i") && V9 != "I")

{

cout << " That spot is already taken.

";

cout << " ";

system("pause");

goto Board;

}

if ((M3 != "A" || M3 != "a") || (M3 != "G" || M3 !="g") || (M3 != "I" || M3 != "i"))

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M2 == "H" || M2 =="h") && V8 == "H")

{

cout << " Invalid move.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "H" || M3 == "h") && V8 != "H")

{

cout << " That spot is already taken.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "J" || M3 == "j") && V10 != "J")

{

cout << " That spot is already taken.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "P" || M3 == "p") && V16 != "P")

{

cout << " That spot is already taken.

";

cout << " ";

system("pause");

goto Board;

}

if ((M3 != "H" || M3 != "h") || (M3 != "J" || M3 !="j") || (M3 != "P" || M3 != "p"))

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M2 == "I" || M2 =="i") && V9 == "I")

{

cout << " Invalid move.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "I" || M3 == "i") && V9 != "I")

{

cout << " That spot is already taken.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "K" || M3 == "k") && V11 != "K")

{

cout << " That spot is already taken.

";

cout << " ";

system("pause");

goto Board;

}

if ((M3 != "I" || M3 != "i") || (M3 != "K" || M3 !="k"))

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M2 == "J" || M2 =="j") && V10 == "J")

{

cout << " Invalid move.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "L" || M3 == "l") && V12 != "L")

{

cout << " That spot is already taken.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "J" || M3 == "j") && V10 != "J")

{

cout << " That spot is already taken.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "B" || M3 == "b") && V2 != "B")

{

cout << " That spot is already taken.

";

cout << " ";

system("pause");

goto Board;

}

if ((M3 != "L" || M3 != "l") || (M3 != "J" || M3 !="j") || (M3 != "B" || M3 != "b"))

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M2 == "K" || M2 =="k") && V11 == "K")

{

cout << " Invalid move.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "M" || M3 == "m") && V13 != "M")

{

cout << " That spot is already taken.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "K" || M3 == "k") && V11 != "K")

{

cout << " That spot is already taken.

";

cout << " ";

system("pause");

goto Board;

}

if ((M3 != "M" || M3 != "m") || (M3 != "K" || M3 !="k"))

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M2 == "L" || M2 =="l") && V12 == "L")

{

cout << " Invalid move.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "L" || M3 == "l") && V12 != "L")

{

cout << " That spot is already taken.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "D" || M3 == "d") && V4 != "D")

{

cout << " That spot is already taken.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "N" || M3 == "n") && V14 != "N")

{

cout << " That spot is already taken.

";

cout << " ";

system("pause");

goto Board;

}

if ((M3 != "L" || M3 != "l") || (M3 != "D" || M3 !="d") || (M3 != "N" || M3 != "n"))

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M2 == "M" || M2 =="m") && V13 == "M")

{

cout << " Invalid move.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "M" || M3 == "m") && V13 != "M")

{

cout << " That spot is already taken.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "O" || M3 == "o") && V15 != "O")

{

cout << " That spot is already taken.

";

cout << " ";

system("pause");

goto Board;

}

if ((M3 != "M" || M3 != "m") || (M3 != "O" || M3 !="o"))

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M2 == "N" || M2 =="n") && V14 == "N")

{

cout << " Invalid move.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "F" || M3 == "f") && V6 != "F")

{

cout << " That spot is already taken.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "P" || M3 == "p") && V16 != "P")

{

cout << " That spot is already taken.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "N" || M3 == "n") && V14 != "N")

{

cout << " That spot is already taken.

";

cout << " ";

system("pause");

goto Board;

}

if ((M3 != "F" || M3 != "f") || (M3 != "P" || M3 !="p") || (M3 != "N" || M3 != "n"))

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M2 == "O" || M2 =="o") && V15 == "O")

{

cout << " Invalid move.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "M" || M3 == "m") && V13 != "M")

{

cout << " That spot is already taken.

";

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.

";

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.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M3 == "O" || M3 == "o") && V15 != "O")

{

cout << " That spot is already taken.

";

cout << " ";

system("pause");

goto Board;

}

if ((M3 != "I" || M3 != "i") || (M3 != "O" || M3 !="o"))

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board;

}

}

if ((M2 == "P" || M2 =="p") && V16 == "P")

{

cout << " Invalid move.

";

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 << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

"; //find who goes first

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << " The computer is \x02.

";

cout << " To see who goes first:

";

cout << " ";

system("pause");

cout << "

";

srand((unsigned)time(0));//randomizer

R1 = (rand()%2) +1; //1-2

if (R1 == 1)

{

cout << " Player \x01 goes first.

";

Val = "\x01";

F1 = 0;

F2 = 0;

}

if (R1 >= 2)

{

cout << " The computer goes first.

";

Val = "\x02";

F1 = 1;

F2 = 1;

}

cout << " ";

system("pause");

Board2:

if (N1 < 0)

{

N1 = 0;

}

if (N2 < 0)

{

N2 = 0;

}

system("cls");

cout << "

";

cout << "

";

cout << " \x01 Six-Men's Morris \x02

";

cout << "

";

cout << " b

";

cout << "

";

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

";

cout << " \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3

";

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

";

cout << " \xb3 \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 k \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3 \xb3

";

cout << " h "<<V8<<"\xc4\xc4\xc4\xc4\xc4\xc4\xc4"<<V9<<" i m "<<V13<<"\xc4\xc4\xc4\xc4\xc4\xc4\xc4"<<V4<<" d

";

cout << " \xb3 \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 o \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3 \xb3

";

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

";

cout << " \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3

";

cout << " \xb3 \xb3 \xb3

";

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

";

cout << "

";

cout << " f

";

cout << "

";

//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.

";

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.

";

cout << " ";

system("pause");

goto Board2;

}

}

if (Cap == "B" || Cap == "b")

{

if (V2 == "\x02")

{

V2 = "B";

goto VA1;

}

if (V2 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board2;

}

}

if (Cap == "C" || Cap == "c")

{

if (V3 == "\x02")

{

V3 = "C";

goto VA1;

}

if (V3 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board2;

}

}

if (Cap == "D" || Cap == "d")

{

if (V4 == "\x02")

{

V4 = "D";

goto VA1;

}

if (V4 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board2;

}

}

if (Cap == "E" || Cap == "e")

{

if (V5 == "\x02")

{

V5 = "E";

goto VA1;

}

if (V5 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board2;

}

}

if (Cap == "F" || Cap == "f")

{

if (V6 == "\x02")

{

V6 = "F";

goto VA1;

}

if (V6 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board2;

}

}

if (Cap == "G" || Cap == "g")

{

if (V7 == "\x02")

{

V7 = "G";

goto VA1;

}

if (V7 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board2;

}

}

if (Cap == "H" || Cap == "h")

{

if (V8 == "\x02")

{

V8 = "H";

goto VA1;

}

if (V8 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board2;

}

}

if (Cap == "I" || Cap == "i")

{

if (V9 == "\x02")

{

V9 = "I";

goto VA1;

}

if (V9 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board2;

}

}

if (Cap == "J" || Cap == "j")

{

if (V10 == "\x02")

{

V10 = "J";

goto VA1;

}

if (V10 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board2;

}

}

if (Cap == "K" || Cap == "k")

{

if (V11 == "\x02")

{

V11 = "K";

goto VA1;

}

if (V11 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board2;

}

}

if (Cap == "L" || Cap == "l")

{

if (V12 == "\x02")

{

V12 = "L";

goto VA1;

}

if (V12 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board2;

}

}

if (Cap == "M" || Cap == "m")

{

if (V13 == "\x02")

{

V13 = "M";

goto VA1;

}

if (V13 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board2;

}

}

if (Cap == "N" || Cap == "n")

{

if (V14 == "\x02")

{

V14 = "N";

goto VA1;

}

if (V14 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board2;

}

}

if (Cap == "O" || Cap == "o")

{

if (V15 == "\x02")

{

V15 = "O";

goto VA1;

}

if (V15 != "\x02")

{

cout << " Invalid move.

";

cout << " ";

system("pause");

goto Board2;

}

}

if (Cap == "P" || Cap == "p")

{

if (V16 == "\x02")

{

V16 = "P";

goto VA1;

}

if (V16 != "\x02")

{

cout << " Invalid move.

";

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 << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << " \x02\x02\x02\x02\x02\x02\x02\x02\x02\x02

";

cout << " \x02 \x02

";

cout << " \x02 \x02 \x02 \x02

";

cout << " \x02 \x02\x02\x02 \x02\x02\x02 \x02

";

cout << " \x02 \x02 \x02 \x02

";

cout << " \x02 \x02

";

cout << " \x02 \x02 \x02 \x02

";

cout << " \x02 \x02 \x02 \x02

";

cout << " \x02 \x02\x02\x02\x02\x02\x02 \x02

";

cout << " \x02 \x02

";

cout << " \x02\x02\x02\x02\x02\x02\x02\x02\x02\x02

";

cout << "

";

cout << " Computer wins.

";

cout << " Do you want to play again?

";

cout << " 1) Yes

"; //play again

cout << " 2) No

";

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 << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << "

";

cout << " \x01\x01\x01\x01\x01\x01\x01\x01\x01\x01

";

cout << " \x01 \x01

";

cout << " \x01 \x01 \x01 \x01

";

cout << " \x01 \x01\x01\x01 \x01\x01\x01 \x01

";

cout << " \x01 \x01 \x01 \x01

";

cout << " \x01 \x01

";

cout << " \x01 \x01 \x01 \x01

";

cout << " \x01 \x01 \x01 \x01

";

cout << " \x01 \x01\x01\x01\x01\x01\x01 \x01

";

cout << " \x01 \x01

";

cout << " \x01\x01\x01\x01\x01\x01\x01\x01\x01\x01

";

cout << "

";

cout << " Player \x01 wins.

";

cout << " Do you want to play again?

";

cout << " 1) Yes

"; //play again

cout << " 2) No

";

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

";

cout << " \xba Moving: \xba Pieces Left: \xba

";

cout << " \xba \xba \x01 " <<Ct1<<" \xba

";

cout << " \xba "<<Val<<" \xba \xba

";

cout << " \xba \xba \x02 " <<Ct2<<" \xba

";

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

";

cout << "

";

}

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

";

cout << " \xba Moving: \xba Pieces Left: \xba Pieces Left to Place: \xba

";

cout << " \xba \xba \x01 " <<Ct1<<" \xba \x01 " <<N1<<" \xba

";

cout << " \xba "<<Val<<" \xba \xba \xba

";

cout << " \xba \xba \x02 " <<Ct2<<" \xba \x02 " <<N2<<" \xba

";

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

";

cout << "

";

}

}

if (N1 <= 0 && Val == "\x01" && Mill < 1 && Mi2 < 1) //MOVE PIECES

{

Chk = 0;

if (F2 == 1)

{

cout << " Computer moved from " << S << " to " << S2 << ".

";

}

if (F2 == 0)

{

cout << " Computer placed a piece at " << Spot << ".

";

}

if (C == 0)

{

cout << endl;

}

if (C == 1)

{

cout << " Computer captured a piece at " << Took << ".



";

C = 0;

}

Dir = "Move a piece from: ";

cout << " "<<Dir<<" ";

cin >> M2;

D2 = "to: ";

cout << " "<<D2<<" ";

cin >> M3;

cout << "

";

}

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";

