Skip to Main Content

JavaFX Game Tic Tac Toe

2909064Mar 3 2016 — edited Mar 11 2016

ReadMe Tic Tac Toe Game

About the Code

  1. TicTacToe.java is the Main Class this class has a controller (TicTacToeController.java) with a fxml file tictactoe.fxml. The controller contains two buttons that use an ActionEvent to load the two other controllers and corresponding fxml files.

This loading uses stage.sizeToScene() and stage.centerOnScreen()

The PeopleController.java contains the code for two people to play the game. A random number generator that creates a number 1 to 10 that determines who goes first X (pink) or O (blue) The playing board is created with a GridPane and a TilePane in each GridPane Cell that holds a Text Node that is assigned the letter X or O based on who’s turn it is. Once a letter is placed in a TilePane it is disabled to prevent further use of that TilePane. Various methods are called from within the MouseEvent() for each TilePane.

This MouseEvent() also checks for a winner with each player turn.

The PlayComputerController.java has additional code that lets the computer monitor where the HUMAN has placed the letter X. This code has one opportunity for the human to win when the HUMAN makes the first move.

The TicTacToe game has two play modes. You can play against the computer or play with a friend.

If you are playing against the computer the Human may go first or the Computer may go first.

This program uses what is known as Artificial Intelligence to teach the computer how to react to the Human moves. Artificial Intelligence code is used to teach robots how to accomplish various tasks.

While there are a limited number of move options for the computer with this game it required 1020 lines of additional code to teach the computer to play the human.

O.pngT.bmpTTT.ico

These Image files need to be placed in a folder named Images

TicTacToeMain

package tictactoe;

import javafx.application.Application;

import static javafx.application.Application.launch;

import javafx.application.Platform;

import javafx.fxml.FXMLLoader;

import javafx.scene.Parent;

import javafx.scene.Scene;

import javafx.scene.image.Image;

import javafx.stage.Stage;

import javafx.stage.WindowEvent;

public class TicTacToe extends Application {

   

    @Override

    public void start(Stage stage) throws Exception {

       

        Parent root = FXMLLoader.load(getClass().getResource("tictactoe.fxml"));

        Scene scene = new Scene(root);

stage.setScene(scene);

stage.setResizable(false);// This sets the value for all stages

stage.getIcons().add(new Image("Images/T.bmp"));// All Stages have this icon

stage.setTitle("Tic Tac Toe");

stage.setOnCloseRequest(e -> handle(e));

        stage.show();

stage.sizeToScene();

    }

   

    private void handle(WindowEvent e) {

Platform.exit();

System.exit(0); 

    }

    public static void main(String[] args) {

        launch(args);

    } 

}

TicTacToeController

package tictactoe;

import java.io.IOException;

import javafx.event.ActionEvent;

import javafx.fxml.FXML;

import javafx.fxml.FXMLLoader;

import javafx.scene.Scene;

import javafx.scene.layout.Pane;

import javafx.stage.Stage;

public class TicTacToeController {

    @FXML private Pane paneMain,panePlayComputer,panePeople;

    public Stage stage;

    @FXML // Load the Controller and coresponding FXML file

    private void onToPlayComputerController(ActionEvent e) throws IOException{

       

        stage = (Stage)paneMain.getScene().getWindow();

panePlayComputer = FXMLLoader.load(getClass().getResource("playcomputer.fxml"));

        Scene scene = new Scene(panePlayComputer);

stage.setScene(scene);

stage.setTitle("Play Against the Computer");

        stage.show();

stage.sizeToScene();

stage.centerOnScreen();

    }

   

    @FXML

    private void onToPeopleController(ActionEvent e) throws IOException{

       

        stage = (Stage)paneMain.getScene().getWindow();

        panePeople = FXMLLoader.load(getClass().getResource("people.fxml"));

        Scene scene = new Scene(panePeople);

stage.setScene(scene);

stage.setTitle("People Play Each Other");

        stage.show();

        stage.sizeToScene();

stage.centerOnScreen();

    }

}

tictactoeFXML

<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.control.Button?>

<?import javafx.scene.layout.Pane?>

<Pane fx:id="paneMain" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="300.0" prefWidth="600.0" style="-fx-background-color: lightgray;" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1" fx:controller="tictactoe.TicTacToeController">

   <children>

      <Button layoutX="150.0" layoutY="60.0" mnemonicParsing="false" onAction="#onToPlayComputerController" prefHeight="60.0" prefWidth="300.0" style="-fx-font-weight: bold; -fx-font-size: 14pt; -fx-border-width: 2.0; -fx-border-color: blue;" text="Play Against the Computer" />

      <Button layoutX="150.0" layoutY="170.0" mnemonicParsing="false" onAction="#onToPeopleController" prefHeight="60.0" prefWidth="300.0" style="-fx-font-weight: bold; -fx-font-size: 14pt; -fx-border-width: 2.0; -fx-border-color: blue;" text="People Play Each Other" />

   </children>

</Pane>

PlayComputerController

package tictactoe;

import java.io.IOException;

import javafx.event.ActionEvent;

import javafx.fxml.FXML;

import javafx.fxml.FXMLLoader;

import javafx.scene.Scene;

import javafx.scene.control.Alert;

import javafx.scene.control.TextField;

import javafx.scene.image.Image;

import javafx.scene.input.MouseEvent;

import javafx.scene.layout.GridPane;

import javafx.scene.layout.Pane;

import javafx.scene.layout.TilePane;

import javafx.scene.paint.ImagePattern;

import javafx.scene.shape.Rectangle;

import javafx.scene.text.Font;

import javafx.scene.text.FontPosture;

import javafx.scene.text.FontWeight;

import javafx.scene.text.Text;

import javafx.stage.Stage;

import javafx.stage.StageStyle;

public class PlayComputerController {

   

    @FXML private GridPane gpField;

    @FXML private TilePane tp00,tp10,tp20;

    @FXML private TilePane tp01,tp11,tp21;

    @FXML private TilePane tp02,tp12,tp22;

    @FXML private Pane panePlayComputer,paneMain;

    @FXML private TextField txfFirstUp,txfWhoWon;

   

    int whoFirst;

    int turn = 0;

    Rectangle recX,recO;

    Text txtLetterToUse;

   

    String XO00,XO10,XO20;

    String XO01,XO11,XO21;

    String XO02,XO12,XO22;

   

    String strX = "X";

    String strO = "O";

    String strInfo;

    String player;

    String letter,whoIsUp;

   

    public Stage stage;

   

    @FXML

    private void onBack(ActionEvent e) throws IOException{

       

        stage = (Stage)panePlayComputer.getScene().getWindow();

        paneMain = FXMLLoader.load(getClass().getResource("tictactoe.fxml"));

        Scene scene = new Scene(paneMain);

stage.setScene(scene);

stage.setTitle("Tic Tac Toe");

        stage.show();

stage.sizeToScene();

stage.centerOnScreen();

    }

   

    @FXML

    private void onStart(ActionEvent e){

       

gpField.setVisible(true);// Click Start to show play field

        ClearField();

txfWhoWon.setStyle("-fx-background-color:white;-fx-font-weight:bold");

txfFirstUp.setStyle("-fx-font-weight:bold");

        turn = 0;

txfFirstUp.setText("");

txfWhoWon.setText("");

        //whoFirst = 10;// for testing only

        whoFirst = (int)(Math.random() * 10 + 1);

        if(whoFirst >= 1 && whoFirst <= 5){

            whoIsUp = "HUM";

            letter = strX;

txfFirstUp.setStyle("-fx-background-color:pink;-fx-font-weight:bold");

txfFirstUp.setText("Human Moves First");

            player = "HUM";

HumansNextMove();

        }else{

            whoIsUp = "COM";

            letter = strO;

txfFirstUp.setStyle("-fx-background-color:lightblue;-fx-font-weight:bold");

txfFirstUp.setText("Computer Went First");

            player = "COM";

ComputerNextMove();

        }

    }

   

    private void ChangeTurn(){

if(whoIsUp.equalsIgnoreCase("HUM")){

            whoIsUp = "COM";

            letter = strO;

        }else{

            whoIsUp = "HUM";

            letter = strX;

        }

    }

    private void LabelInfo(){

        strInfo = letter;

    }

   

    private void TextInfo(){

       

        txtLetterToUse = new Text(strInfo);

if(whoIsUp.equalsIgnoreCase("HUM")){

txtLetterToUse.setStyle("-fx-fill:red");

        }else{

txtLetterToUse.setStyle("-fx-fill:blue");   

        }

       

txtLetterToUse.setFont(Font.font("Times New Roman", FontWeight.BOLD,FontPosture.REGULAR, 60));

    }

   

    private void ComputerNextMove(){

       

        WhoWon();

       

        if(player.matches("COM") && turn == 0 ){

onMC11(null);

        }else if(XO10.equalsIgnoreCase("X") && turn == 2){

onMC02(null);

        }else if(XO21.equalsIgnoreCase("X") && turn == 2){

onMC00(null);

        }else if(XO01.equalsIgnoreCase("X") && turn == 2){

onMC20(null);

        }else if(XO12.equalsIgnoreCase("X") && turn == 2){

onMC00(null);

        }else if(XO00.equalsIgnoreCase("X") && turn == 2){

onMC02(null);

        }else if(XO20.equalsIgnoreCase("X") && turn == 2){

onMC22(null);

        }else if(XO22.equalsIgnoreCase("X") && turn == 2){

onMC20(null);

        }else if(XO02.equalsIgnoreCase("X") && turn == 2){

onMC00(null);

           

        // The Fours

        }else if(XO00.equalsIgnoreCase("O") && XO21.equalsIgnoreCase("X") && !tp22.isDisable() && turn == 4){

onMC22(null);

        }else if(XO00.equalsIgnoreCase("O") && XO12.equalsIgnoreCase("X") && !tp22.isDisable() && turn == 4){

            onMC22(null);

        }else if(XO02.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && !tp20.isDisable() && turn == 4){

onMC20(null);

        }else if(XO20.equalsIgnoreCase("O") && XO01.equalsIgnoreCase("X") && !tp02.isDisable() && turn == 4){ 

onMC02(null);

        }else if(XO02.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X") && !tp10.isDisable() && turn == 4){

onMC10(null);

        }else if(XO22.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X") && !tp10.isDisable() && turn == 4){

onMC10(null);

        }else if(XO20.equalsIgnoreCase("O") && XO22.equalsIgnoreCase("X") && XO02.equalsIgnoreCase("X") && !tp12.isDisable() && turn == 4){

            onMC12(null);

        }else if(XO00.equalsIgnoreCase("O") && XO22.equalsIgnoreCase("X") && XO02.equalsIgnoreCase("X") && !tp12.isDisable() && turn == 4){

onMC12(null);

        }else if(XO00.equalsIgnoreCase("O") && XO20.equalsIgnoreCase("X") && XO02.equalsIgnoreCase("X") && !tp22.isDisable() && turn == 4){

onMC22(null);

        }else if(XO02.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X") && !tp00.isDisable() && turn == 4){

            onMC00(null);

        }else if(XO00.equalsIgnoreCase("O") && XO21.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X") && !tp20.isDisable() && turn == 4){

onMC20(null);

        }else if(XO00.equalsIgnoreCase("O") && XO12.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X") && !tp02.isDisable() && turn == 4){

onMC02(null);

        }else if(XO20.equalsIgnoreCase("O") && XO12.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X") && !tp02.isDisable() && turn == 4){

onMC02(null);

        }else if(XO22.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X") && !tp00.isDisable() && turn == 4){

onMC00(null);

        }else if(XO20.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X") && !tp02.isDisable() && turn == 4){

onMC02(null);

        }else if(XO02.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X") && !tp20.isDisable() && turn == 4){

onMC20(null);

        }else if(XO02.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO01.equalsIgnoreCase("X") && !tp20.isDisable() && turn == 4){

onMC20(null);

        }else if(XO22.equalsIgnoreCase("O") && XO20.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X") && !tp00.isDisable() && turn == 4){

onMC00(null);

        }else if(XO20.equalsIgnoreCase("O") && XO21.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X") && !tp02.isDisable() && turn == 4){

onMC02(null);

        }else if(XO22.equalsIgnoreCase("O") && XO02.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X") && !tp00.isDisable() && turn == 4){

onMC00(null);

        }else if(XO20.equalsIgnoreCase("O") && XO01.equalsIgnoreCase("X") && XO02.equalsIgnoreCase("X") && !tp00.isDisable() && turn == 4){

onMC00(null);

        }else if(XO02.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X") && !tp20.isDisable() && turn == 4){

onMC20(null);

        }else if(XO22.equalsIgnoreCase("O") && XO20.equalsIgnoreCase("X") && XO01.equalsIgnoreCase("X") && !tp00.isDisable() && turn == 4){

onMC00(null);

        }else if(XO00.equalsIgnoreCase("O") && XO02.equalsIgnoreCase("X") && XO10.equalsIgnoreCase("X") && !tp22.isDisable() && turn == 4){

onMC22(null);

        }else if(XO00.equalsIgnoreCase("O") && XO02.equalsIgnoreCase("X") && XO01.equalsIgnoreCase("X") && !tp22.isDisable() && turn == 4){

onMC22(null);

        // The Six's

        }else if(XO01.equals("X") && XO02.equalsIgnoreCase("X") && !tp22.isDisable() && turn == 6){

onMC22(null);

        }else if(XO01.equals("X") && XO10.equalsIgnoreCase("X") && !tp22.isDisable() && turn == 6){

onMC22(null);

        }else if(XO22.equals("X") && XO10.equalsIgnoreCase("X") && !tp02.isDisable() && turn == 6){

onMC02(null);

        }else if(XO22.equals("X") && XO01.equalsIgnoreCase("X") && !tp20.isDisable() && turn == 6){

onMC20(null);

        }else if(XO22.equals("X") && XO01.equalsIgnoreCase("X") && !tp10.isDisable() && turn == 6){

onMC10(null);

        }else if(XO22.equals("X") && XO20.equalsIgnoreCase("X") && !tp01.isDisable() && turn == 6){

onMC01(null);

        }else if(XO21.equals("X") && XO02.equalsIgnoreCase("X") && !tp10.isDisable() && turn == 6){

onMC10(null);

        }else if(XO00.equals("X") && XO12.equalsIgnoreCase("X") && !tp01.isDisable() && turn == 6){

onMC01(null);

        }else if(XO22.equals("X") && XO10.equalsIgnoreCase("X") && !tp00.isDisable() && turn == 6){

onMC00(null);

        }else if(XO02.equals("X") && XO10.equalsIgnoreCase("X") && !tp01.isDisable() && turn == 6){

onMC01(null);

        }else if(XO21.equals("X") && XO22.equalsIgnoreCase("X") && XO12.equalsIgnoreCase("X") && !tp02.isDisable() && turn == 6){

onMC02(null);

        }else if(XO21.equals("X") && XO22.equalsIgnoreCase("X") && XO12.equalsIgnoreCase("X") && !tp01.isDisable() && turn == 6){     

onMC01(null);

        }else if(XO10.equals("X") && XO20.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X") && !tp22.isDisable() && turn == 6){     

onMC22(null);

        }else if(XO10.equals("X") && XO20.equalsIgnoreCase("X") && XO12.equalsIgnoreCase("X") && !tp22.isDisable() && turn == 6){     

onMC22(null);

        }else if(XO10.equals("X") && XO22.equalsIgnoreCase("X") && XO12.equalsIgnoreCase("X") && !tp01.isDisable() && turn == 6){     

onMC01(null);

         

        // The Eights

        }else if(XO02.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X") && !tp20.isDisable() && turn == 8){

onMC20(null);

        }else if(XO22.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X") && !tp01.isDisable() && turn == 8){

            onMC01(null);

        }else if(XO22.equalsIgnoreCase("X") && XO01.equalsIgnoreCase("X") && !tp21.isDisable() && turn == 8){

onMC21(null);

        }else if(XO00.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X") && !tp02.isDisable() && turn == 8){

onMC02(null);

        }else if(XO00.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X") && !tp22.isDisable() && turn == 8){

onMC22(null); 

        }else if(XO00.equalsIgnoreCase("X") && XO12.equalsIgnoreCase("X") && !tp01.isDisable() && turn == 8){

onMC01(null);

        }else if(XO00.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X") && XO12.equalsIgnoreCase("X")

            && XO22.equalsIgnoreCase("X") && !tp21.isDisable() && turn == 8){

            onMC21(null);

        }else if(XO00.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X") && XO12.equalsIgnoreCase("X")

            && XO02.equalsIgnoreCase("X") && !tp21.isDisable() && turn == 8){

onMC21(null);

        }else if(XO10.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X") && XO02.equalsIgnoreCase("X")

            && XO22.equalsIgnoreCase("X") && !tp21.isDisable() && turn == 8){

onMC21(null);

    }

    }

   

    private void HumansNextMove(){

//txfWhoWon.setText("TURN "+turn);// for development what turn are we on

        WhoWon();

       

if(XO11.equalsIgnoreCase("X") && turn == 1){

onMC00(null);

        }else if(XO00.equalsIgnoreCase("X") && turn == 1){

onMC11(null);

        }else if(XO10.equalsIgnoreCase("X") && turn == 1){

onMC11(null);

        }else if(XO20.equalsIgnoreCase("X") && turn == 1){

onMC11(null);

        }else if(XO01.equalsIgnoreCase("X") && turn == 1){

onMC11(null);

        }else if(XO21.equalsIgnoreCase("X") && turn == 1){

onMC11(null);

        }else if(XO02.equalsIgnoreCase("X") && turn == 1){

onMC11(null);

        }else if(XO12.equalsIgnoreCase("X") && turn == 1){

onMC11(null);

        }else if(XO22.equalsIgnoreCase("X") && turn == 1){

onMC11(null);

         // THREE BELOW

        }else if(XO22.equalsIgnoreCase("X") && XO10.equalsIgnoreCase("X") && !tp20.isDisable() && turn == 3){

onMC20(null);       

        }else if(XO02.equalsIgnoreCase("X") && XO10.equalsIgnoreCase("X") && !tp00.isDisable() && turn == 3){

onMC00(null);

        }else if(XO21.equalsIgnoreCase("X") && XO02.equalsIgnoreCase("X") && !tp00.isDisable() && turn == 3){

onMC00(null);

        }else if(XO21.equalsIgnoreCase("X") && XO10.equalsIgnoreCase("X") && !tp20.isDisable() && turn == 3){

onMC20(null);

        }else if(XO12.equalsIgnoreCase("X") && XO00.equalsIgnoreCase("X") && !tp02.isDisable() && turn == 3){

            onMC02(null);

        }else if(XO12.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X") && !tp22.isDisable() && turn == 3){

onMC22(null);

        }else if(XO12.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X") && !tp00.isDisable() && turn == 3){

onMC00(null);

        }else if(XO11.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X") && !tp01.isDisable() && turn == 3){

onMC01(null);

        }else if(XO22.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X") && !tp21.isDisable() && turn == 3){

onMC21(null);           

        }else if(XO01.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X") && !tp02.isDisable() && turn == 3){

onMC02(null);           

        }else if(XO01.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X") && !tp00.isDisable() && turn == 3){

onMC00(null);           

        }else if(XO12.equalsIgnoreCase("X") && XO01.equalsIgnoreCase("X") && !tp02.isDisable() && turn == 3){

onMC02(null);

        }else if(XO11.equalsIgnoreCase("X") && XO02.equalsIgnoreCase("X") && !tp20.isDisable() && turn == 3){

onMC20(null);

        }else if(XO11.equalsIgnoreCase("X") && XO12.equalsIgnoreCase("X") && !tp10.isDisable() && turn == 3){

onMC10(null);

        }else if(XO11.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X") && !tp10.isDisable() && turn == 3){

onMC10(null); // this lets HUMAN win code below prevent that BUT need changes in 5 at ln 670

        //}else if(XO11.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X") && !tp20.isDisable() && turn == 3){

//onMC20(null);// if this code is used then ln 670 on down needs changes not sure of 7 fallout ?

        }else if(XO00.equalsIgnoreCase("X") && XO10.equalsIgnoreCase("X") && !tp20.isDisable() && turn == 3){

onMC20(null);           

        }else if(XO10.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X") && !tp00.isDisable() && turn == 3){

onMC00(null);

        }else if(XO02.equalsIgnoreCase("X") && XO12.equalsIgnoreCase("X") && !tp22.isDisable() && turn == 3){

onMC22(null);

        }else if(XO00.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X") && !tp20.isDisable() && turn == 3){

onMC20(null);

        }else if(XO01.equalsIgnoreCase("X") && XO10.equalsIgnoreCase("X") && !tp00.isDisable() && turn == 3){

onMC00(null);

        }else if(XO01.equalsIgnoreCase("X") && XO11.equalsIgnoreCase("X") && !tp21.isDisable() && turn == 3){

onMC21(null);

        }else if(XO20.equalsIgnoreCase("X") && XO11.equalsIgnoreCase("X") && !tp02.isDisable() && turn == 3){

onMC02(null);

        }else if(XO10.equalsIgnoreCase("X") && XO11.equalsIgnoreCase("X") && !tp12.isDisable() && turn == 3){

onMC12(null);

        }else if(XO02.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X") && !tp21.isDisable() && turn == 3){

onMC21(null);

        }else if(XO02.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X") && !tp12.isDisable() && turn == 3){

            onMC12(null);

        }else if(XO00.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X") && !tp01.isDisable() && turn == 3){

onMC01(null);

        }else if(XO00.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X") && !tp10.isDisable() && turn == 3){

            onMC10(null);

        }else if(XO00.equalsIgnoreCase("X") && XO02.equalsIgnoreCase("X") && !tp01.isDisable() && turn == 3){

onMC01(null);

        }else if(XO21.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X") && !tp20.isDisable() && turn == 3){

onMC20(null);

        }else if(XO10.equalsIgnoreCase("X") && XO12.equalsIgnoreCase("X") && !tp11.isDisable() && turn == 3){

onMC11(null);

        }else if(XO10.equalsIgnoreCase("X") && XO12.equalsIgnoreCase("X") && !tp00.isDisable() && turn == 3){

onMC00(null);

        }else if(XO01.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X") && !tp11.isDisable() && turn == 3){

onMC11(null);

        }else if(XO01.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X") && !tp10.isDisable() && turn == 3){

onMC10(null);

        }else if(XO01.equalsIgnoreCase("X") && XO02.equalsIgnoreCase("X") && !tp00.isDisable() && turn == 3){

onMC00(null);

        }else if(XO21.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X") && !tp11.isDisable() && turn == 3){

onMC11(null);

        }else if(XO20.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X") && !tp22.isDisable() && turn == 3){

onMC22(null);

        }else if(XO00.equalsIgnoreCase("X") && XO01.equalsIgnoreCase("X") && !tp02.isDisable() && turn == 3){

onMC02(null);

        }else if(XO22.equalsIgnoreCase("X") && XO12.equalsIgnoreCase("X") && !tp02.isDisable() && turn == 3){

onMC02(null);

          

        // THE FIVES

        }else if(XO10.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X")

            && XO12.equalsIgnoreCase("X") && turn == 5 && !tp02.isDisable()){

onMC02(null);

        }else if(XO10.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X")

            && XO01.equalsIgnoreCase("X") && turn == 5 && !tp12.isDisable()){

onMC12(null);

        }else if(XO10.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X")

            && XO02.equalsIgnoreCase("X") && turn == 5 && !tp12.isDisable()){

onMC12(null);

        }else if(XO10.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X")

            && XO21.equalsIgnoreCase("X") && turn == 5 && !tp12.isDisable()){

onMC12(null);

        }else if(XO10.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X")

            && XO22.equalsIgnoreCase("X") && turn == 5 && !tp12.isDisable()){

onMC12(null);

        }else if(XO10.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO01.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X")

            && XO12.equalsIgnoreCase("X") && turn == 5 && !tp00.isDisable()){

onMC00(null);

        }else if(XO10.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO01.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X")

            && XO00.equalsIgnoreCase("X") && turn == 5 && !tp12.isDisable()){

onMC12(null);

        }else if(XO10.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO01.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X")

            && XO20.equalsIgnoreCase("X") && turn == 5 && !tp12.isDisable()){

onMC12(null);

        }else if(XO10.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO01.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X")

            && XO02.equalsIgnoreCase("X") && turn == 5 && !tp12.isDisable()){

onMC12(null);

        }else if(XO10.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO01.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X")

            && XO22.equalsIgnoreCase("X") && turn == 5 && !tp12.isDisable()){

onMC12(null);

        }else if(XO12.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO02.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X")

            && XO10.equalsIgnoreCase("X") && turn == 5 && !tp01.isDisable()){

onMC01(null);

        }else if(XO12.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO02.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X")

            && XO01.equalsIgnoreCase("X") && turn == 5 && !tp10.isDisable()){

onMC10(null);

        }else if(XO12.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO02.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X")

            && XO21.equalsIgnoreCase("X") && turn == 5 && !tp10.isDisable()){

onMC10(null);

        }else if(XO12.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO02.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X")

            && XO00.equalsIgnoreCase("X") && turn == 5 && !tp10.isDisable()){

            onMC10(null);

        }else if(XO12.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO02.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X")

            && XO20.equalsIgnoreCase("X") && turn == 5 && !tp10.isDisable()){

onMC10(null);

        }else if(XO01.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO02.equalsIgnoreCase("X")

            && XO21.equalsIgnoreCase("X") && turn == 5 && !tp10.isDisable()){

onMC10(null);

        }else if(XO01.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO02.equalsIgnoreCase("X")

            && XO10.equalsIgnoreCase("X") && turn == 5 && !tp21.isDisable()){

onMC21(null);

        }else if(XO01.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO02.equalsIgnoreCase("X")

            && XO12.equalsIgnoreCase("X") && turn == 5 && !tp21.isDisable()){

onMC21(null);

        }else if(XO01.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO02.equalsIgnoreCase("X")

            && XO22.equalsIgnoreCase("X") && turn == 5 && !tp21.isDisable()){

onMC21(null);

        }else if(XO01.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO02.equalsIgnoreCase("X")

            && XO20.equalsIgnoreCase("X") && turn == 5 && !tp21.isDisable()){

onMC21(null);

        }else if(XO00.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO12.equalsIgnoreCase("X")

            && XO22.equalsIgnoreCase("X") && turn == 5 && !tp02.isDisable()){

onMC02(null);

        }else if(XO00.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO12.equalsIgnoreCase("X")

            && XO20.equalsIgnoreCase("X") && turn == 5 && !tp22.isDisable()){

onMC22(null);

        }else if(XO00.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO12.equalsIgnoreCase("X")

            && XO21.equalsIgnoreCase("X") && turn == 5 && !tp22.isDisable()){

onMC22(null);

        }else if(XO00.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO12.equalsIgnoreCase("X")

            && XO02.equalsIgnoreCase("X") && turn == 5 && !tp22.isDisable()){

onMC22(null);

        }else if(XO00.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO12.equalsIgnoreCase("X")

            && XO01.equalsIgnoreCase("X") && turn == 5 && !tp22.isDisable()){

onMC22(null);

        }else if(XO21.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO20.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X")

            && XO01.equalsIgnoreCase("X") && turn == 5 && !tp10.isDisable()){

onMC10(null);

        }else if(XO21.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO20.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X")

            && XO00.equalsIgnoreCase("X") && turn == 5 && !tp01.isDisable()){

onMC01(null);

        }else if(XO21.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO20.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X")

            && XO10.equalsIgnoreCase("X") && turn == 5 && !tp01.isDisable()){

            onMC01(null);

        }else if(XO21.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO20.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X")

            && XO12.equalsIgnoreCase("X") && turn == 5 && !tp01.isDisable()){

            onMC01(null);

        }else if(XO21.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO20.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X")

            && XO02.equalsIgnoreCase("X") && turn == 5 && !tp01.isDisable()){

onMC01(null);

        }else if(XO01.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X")

            && XO21.equalsIgnoreCase("X") && turn == 5 && !tp20.isDisable()){

onMC20(null);

        }else if(XO01.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X")

            && XO10.equalsIgnoreCase("X") && turn == 5 && !tp21.isDisable()){

onMC21(null);

        }else if(XO01.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X")

            && XO02.equalsIgnoreCase("X") && turn == 5 && !tp21.isDisable()){

onMC21(null);

        }else if(XO01.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X")

            && XO12.equalsIgnoreCase("X") && turn == 5 && !tp21.isDisable()){

onMC21(null);

        }else if(XO01.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X")

            && XO20.equalsIgnoreCase("X") && turn == 5 && !tp21.isDisable()){

onMC21(null);

        }else if(XO21.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO20.equalsIgnoreCase("X") && XO02.equalsIgnoreCase("X")

            && XO01.equalsIgnoreCase("X") && turn == 5 && !tp00.isDisable()){

onMC00(null);

        }else if(XO21.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO20.equalsIgnoreCase("X") && XO02.equalsIgnoreCase("X")

            && XO00.equalsIgnoreCase("X") && turn == 5 && !tp01.isDisable()){

onMC01(null);

        }else if(XO21.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO20.equalsIgnoreCase("X") && XO02.equalsIgnoreCase("X")

            && XO10.equalsIgnoreCase("X") && turn == 5 && !tp01.isDisable()){

onMC01(null);   

        }else if(XO21.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO20.equalsIgnoreCase("X") && XO02.equalsIgnoreCase("X")

            && XO22.equalsIgnoreCase("X") && turn == 5 && !tp01.isDisable()){

onMC01(null);

        }else if(XO21.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO20.equalsIgnoreCase("X") && XO02.equalsIgnoreCase("X")

            && XO12.equalsIgnoreCase("X") && turn == 5 && !tp01.isDisable()){

onMC01(null);

        }else if(XO20.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X")

            && XO02.equalsIgnoreCase("X") && turn == 5 && !tp00.isDisable()){

onMC00(null);

        }else if(XO20.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X")

            && XO22.equalsIgnoreCase("X") && turn == 5 && !tp02.isDisable()){

onMC02(null);

        }else if(XO20.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X")

            && XO12.equalsIgnoreCase("X") && turn == 5 && !tp02.isDisable()){

            onMC02(null);

        }else if(XO20.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X")

            && XO00.equalsIgnoreCase("X") && turn == 5 && !tp02.isDisable()){

onMC02(null);

        }else if(XO20.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X")

            && XO01.equalsIgnoreCase("X") && turn == 5 && !tp02.isDisable()){

onMC02(null);

        }else if(XO22.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO12.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X")

            && XO00.equalsIgnoreCase("X") && turn == 5 && !tp20.isDisable()){

onMC20(null);

        }else if(XO22.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO12.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X")

            && XO10.equalsIgnoreCase("X") && turn == 5 && !tp00.isDisable()){

onMC00(null);

        }else if(XO22.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO12.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X")

            && XO20.equalsIgnoreCase("X") && turn == 5 && !tp00.isDisable()){

onMC00(null);

        }else if(XO22.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO12.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X")

            && XO02.equalsIgnoreCase("X") && turn == 5 && !tp00.isDisable()){

onMC00(null);

        }else if(XO22.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO12.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X")

            && XO01.equalsIgnoreCase("X") && turn == 5 && !tp00.isDisable()){

onMC00(null);

        }else if(XO02.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO12.equalsIgnoreCase("X") && XO01.equalsIgnoreCase("X")

            && XO20.equalsIgnoreCase("X") && turn == 5 && !tp22.isDisable()){

onMC22(null);

        }else if(XO02.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO12.equalsIgnoreCase("X") && XO01.equalsIgnoreCase("X")

            && XO21.equalsIgnoreCase("X") && turn == 5 && !tp20.isDisable()){

onMC20(null);

        }else if(XO02.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO12.equalsIgnoreCase("X") && XO01.equalsIgnoreCase("X")

            && XO22.equalsIgnoreCase("X") && turn == 5 && !tp20.isDisable()){

onMC20(null);

        }else if(XO02.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO12.equalsIgnoreCase("X") && XO01.equalsIgnoreCase("X")

            && XO00.equalsIgnoreCase("X") && turn == 5 && !tp20.isDisable()){

onMC20(null);

        }else if(XO02.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO12.equalsIgnoreCase("X") && XO01.equalsIgnoreCase("X")

            && XO10.equalsIgnoreCase("X") && turn == 5 && !tp20.isDisable()){

onMC20(null);

        }else if(XO00.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO01.equalsIgnoreCase("X")

            && XO22.equalsIgnoreCase("X") && turn == 5 && !tp20.isDisable()){

onMC20(null);

        }else if(XO00.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO01.equalsIgnoreCase("X")

            && XO20.equalsIgnoreCase("X") && turn == 5 && !tp22.isDisable()){

            onMC22(null);

        }else if(XO00.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO01.equalsIgnoreCase("X")

            && XO21.equalsIgnoreCase("X") && turn == 5 && !tp22.isDisable()){

onMC22(null);

        }else if(XO00.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO01.equalsIgnoreCase("X")

            && XO02.equalsIgnoreCase("X") && turn == 5 && !tp22.isDisable()){

onMC22(null);

        }else if(XO00.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO01.equalsIgnoreCase("X")

            && XO12.equalsIgnoreCase("X") && turn == 5 && !tp22.isDisable()){

onMC22(null);

        }else if(XO00.equalsIgnoreCase("O") && XO12.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO11.equalsIgnoreCase("X")

            && XO02.equalsIgnoreCase("X") && turn == 5 && !tp20.isDisable()){

onMC20(null);

        }else if(XO00.equalsIgnoreCase("O") && XO12.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO11.equalsIgnoreCase("X")

            && XO01.equalsIgnoreCase("X") && turn == 5 && !tp21.isDisable()){

onMC21(null);

        }else if(XO00.equalsIgnoreCase("O") && XO12.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO11.equalsIgnoreCase("X")

            && XO20.equalsIgnoreCase("X") && turn == 5 && !tp02.isDisable()){

onMC02(null);

        }else if(XO00.equalsIgnoreCase("O") && XO12.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO11.equalsIgnoreCase("X")

            && XO21.equalsIgnoreCase("X") && turn == 5 && !tp01.isDisable()){

onMC01(null);

        }else if(XO00.equalsIgnoreCase("O") && XO12.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO11.equalsIgnoreCase("X")

            && XO22.equalsIgnoreCase("X") && turn == 5 && !tp02.isDisable()){

onMC02(null);

        }else if(XO00.equalsIgnoreCase("O") && XO02.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X")

            && XO01.equalsIgnoreCase("X") && turn == 5 && !tp21.isDisable()){

onMC21(null);

        }else if(XO00.equalsIgnoreCase("O") && XO02.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X")

            && XO10.equalsIgnoreCase("X") && turn == 5 && !tp01.isDisable()){

onMC01(null);

        }else if(XO00.equalsIgnoreCase("O") && XO02.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X")

            && XO21.equalsIgnoreCase("X") && turn == 5 && !tp01.isDisable()){

onMC01(null);

        }else if(XO00.equalsIgnoreCase("O") && XO02.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X")

            && XO22.equalsIgnoreCase("X") && turn == 5 && !tp01.isDisable()){

onMC01(null);

        }else if(XO00.equalsIgnoreCase("O") && XO02.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X")

            && XO12.equalsIgnoreCase("X") && turn == 5 && !tp01.isDisable()){

onMC01(null);

        }else if(XO00.equalsIgnoreCase("O") && XO01.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X")

            && XO02.equalsIgnoreCase("X") && turn == 5 && !tp20.isDisable()){

            onMC20(null);

        }else if(XO00.equalsIgnoreCase("O") && XO01.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X")

            && XO10.equalsIgnoreCase("X") && turn == 5 && !tp02.isDisable()){

            onMC02(null);

        }else if(XO00.equalsIgnoreCase("O") && XO01.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X")

            && XO20.equalsIgnoreCase("X") && turn == 5 && !tp02.isDisable()){

onMC02(null);

        }else if(XO00.equalsIgnoreCase("O") && XO01.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X")

            && XO22.equalsIgnoreCase("X") && turn == 5 && !tp02.isDisable()){

onMC02(null);

        }else if(XO00.equalsIgnoreCase("O") && XO01.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO21.equalsIgnoreCase("X")

            && XO12.equalsIgnoreCase("X") && turn == 5 && !tp02.isDisable()){

onMC02(null);

        }else if(XO00.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO12.equalsIgnoreCase("X")

            && XO20.equalsIgnoreCase("X") && turn == 5 && !tp02.isDisable()){

onMC02(null);

        }else if(XO00.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO12.equalsIgnoreCase("X")

            && XO01.equalsIgnoreCase("X") && turn == 5 && !tp20.isDisable()){

onMC20(null);

        }else if(XO00.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO12.equalsIgnoreCase("X")

            && XO02.equalsIgnoreCase("X") && turn == 5 && !tp20.isDisable()){

onMC20(null);

        }else if(XO00.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO12.equalsIgnoreCase("X")

            && XO21.equalsIgnoreCase("X") && turn == 5 && !tp20.isDisable()){

onMC20(null);

        }else if(XO00.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO12.equalsIgnoreCase("X")

            && XO22.equalsIgnoreCase("X") && turn == 5 && !tp20.isDisable()){

onMC20(null);

        }else if(XO00.equalsIgnoreCase("O") && XO21.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO01.equalsIgnoreCase("X")

            && XO20.equalsIgnoreCase("X") && turn == 5 && !tp02.isDisable()){

onMC02(null);

        }else if(XO00.equalsIgnoreCase("O") && XO21.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO01.equalsIgnoreCase("X")

            && XO10.equalsIgnoreCase("X") && turn == 5 && !tp12.isDisable()){

onMC12(null);

        }else if(XO00.equalsIgnoreCase("O") && XO21.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO01.equalsIgnoreCase("X")

            && XO12.equalsIgnoreCase("X") && turn == 5 && !tp10.isDisable()){

onMC10(null);

        }else if(XO00.equalsIgnoreCase("O") && XO21.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO01.equalsIgnoreCase("X")

            && XO02.equalsIgnoreCase("X") && turn == 5 && !tp20.isDisable()){

onMC20(null);

        }else if(XO00.equalsIgnoreCase("O") && XO21.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO01.equalsIgnoreCase("X")

            && XO22.equalsIgnoreCase("X") && turn == 5 && !tp12.isDisable()){

onMC12(null);

        }else if(XO00.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X")

            && XO20.equalsIgnoreCase("X") && turn == 5 && !tp21.isDisable()){

            onMC21(null);

        /// Fall Out change see line 285 above ?

        }else if(XO00.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X")

            && XO01.equalsIgnoreCase("X") && turn == 5 && !tp20.isDisable()){

onMC20(null);

        }else if(XO00.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X")

            && XO02.equalsIgnoreCase("X") && turn == 5 && !tp20.isDisable()){

            onMC20(null);

        }else if(XO00.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X")

            && XO12.equalsIgnoreCase("X") && turn == 5 && !tp20.isDisable()){

            onMC20(null);

        }else if(XO00.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X")

            && XO21.equalsIgnoreCase("X") && turn == 5 && !tp20.isDisable()){

onMC20(null);

        }else if(XO00.equalsIgnoreCase("O") && XO20.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO02.equalsIgnoreCase("X")

            && XO10.equalsIgnoreCase("X") && turn == 5 && !tp12.isDisable()){

onMC12(null);

        }else if(XO00.equalsIgnoreCase("O") && XO20.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO02.equalsIgnoreCase("X")

            && XO01.equalsIgnoreCase("X") && turn == 5 && !tp10.isDisable()){

onMC10(null);

        }else if(XO00.equalsIgnoreCase("O") && XO20.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO02.equalsIgnoreCase("X")

            && XO12.equalsIgnoreCase("X") && turn == 5 && !tp10.isDisable()){

onMC10(null);

        }else if(XO00.equalsIgnoreCase("O") && XO20.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO02.equalsIgnoreCase("X")

            && XO22.equalsIgnoreCase("X") && turn == 5 && !tp10.isDisable()){

onMC10(null);

        }else if(XO00.equalsIgnoreCase("O") && XO20.equalsIgnoreCase("O") && XO11.equalsIgnoreCase("X") && XO02.equalsIgnoreCase("X")

            && XO21.equalsIgnoreCase("X") && turn == 5 && !tp10.isDisable()){

onMC10(null);

        }else if(XO11.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X")

            && XO22.equalsIgnoreCase("X") && turn == 5 && !tp21.isDisable()){

onMC21(null);

        }else if(XO11.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X")

            && XO01.equalsIgnoreCase("X") && turn == 5 && !tp22.isDisable()){

onMC22(null);

        }else if(XO11.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X")

            && XO21.equalsIgnoreCase("X") && turn == 5 && !tp22.isDisable()){

onMC22(null);

        }else if(XO11.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X")

            && XO02.equalsIgnoreCase("X") && turn == 5 && !tp22.isDisable()){

onMC22(null);

        }else if(XO11.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("O") && XO10.equalsIgnoreCase("X") && XO20.equalsIgnoreCase("X")

            && XO12.equalsIgnoreCase("X") && turn == 5 &&  !tp22.isDisable()){

onMC22(null);

        }else if(XO11.equalsIgnoreCase("O") && XO02.equalsIgnoreCase("O") && XO12.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X")

            && XO20.equalsIgnoreCase("X") && turn == 5 && !tp21.isDisable()){

onMC21(null);

        }else if(XO11.equalsIgnoreCase("O") && XO02.equalsIgnoreCase("O") && XO12.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X")

            && XO01.equalsIgnoreCase("X") && turn == 5 && !tp20.isDisable()){

onMC20(null);

        }else if(XO11.equalsIgnoreCase("O") && XO02.equalsIgnoreCase("O") && XO12.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X")

            && XO00.equalsIgnoreCase("X") && turn == 5 && !tp20.isDisable()){

            onMC20(null);

        }else if(XO11.equalsIgnoreCase("O") && XO02.equalsIgnoreCase("O") && XO12.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X")

            && XO10.equalsIgnoreCase("X") && turn == 5 && !tp20.isDisable()){

onMC20(null);

        }else if(XO11.equalsIgnoreCase("O") && XO02.equalsIgnoreCase("O") && XO12.equalsIgnoreCase("X") && XO22.equalsIgnoreCase("X")

            && XO21.equalsIgnoreCase("X") && turn == 5 && !tp20.isDisable()){

onMC20(null);

        }else if(XO11.equalsIgnoreCase("O") && XO20.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO10.equalsIgnoreCase("X")

            && XO02.equalsIgnoreCase("X") && turn == 5 && !tp01.isDisable()){

onMC01(null);

        }else if(XO11.equalsIgnoreCase("O") && XO20.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO10.equalsIgnoreCase("X")

            && XO01.equalsIgnoreCase("X") && turn == 5 && !tp02.isDisable()){

onMC02(null);

        }else if(XO11.equalsIgnoreCase("O") && XO20.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO10.equalsIgnoreCase("X")

            && XO12.equalsIgnoreCase("X") && turn == 5 && !tp02.isDisable()){

onMC02(null);

        }else if(XO11.equalsIgnoreCase("O") && XO20.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO10.equalsIgnoreCase("X")

            && XO22.equalsIgnoreCase("X") && turn == 5 && !tp02.isDisable()){

onMC02(null);

        }else if(XO11.equalsIgnoreCase("O") && XO20.equalsIgnoreCase("O") && XO00.equalsIgnoreCase("X") && XO10.equalsIgnoreCase("X")

            && XO21.equalsIgnoreCase("X") && turn == 5 && !tp02.isDisable()){

onMC02(null);

        }else if(XO11.equalsIgnoreCase("O") && XO22.equalsIgnoreCase("O") && XO02.equalsIgnoreCase("X") && XO12.equalsIgnoreCase("X")

            && XO00.equalsIgnoreCase("X") && turn == 5 && !tp01.isDisable()){

onMC01(null);

        }else if(XO11.equalsIgnoreCase("O") && XO22.equalsIgnoreCase("O") && XO02.equalsIgnoreCase("X") && XO12.equalsIgnoreCase("X")

            && XO01.equalsIgnoreCase("X") && turn == 5 && !tp00.isDisable()){

onMC00(null);

        }else if(XO11.equalsIgnoreCase("O") && XO22.equalsIgnoreCase("O") && XO02.equalsIgnoreCase("X") && XO12.equalsIgnoreCase("X")

            && XO20.equalsIgnoreCase("X") &&a

Comments
Post Details
Added on Mar 3 2016
2 comments
1,255 views