public void assertTurn(){
        // print("assertion called");
        int count = 0;
        int countX = 0;
        int countO = 0;
        for (int i=0;i!=8;i++){
            for (int j=0;j!=8;j++){
                if (grid[i][j] == 0){
                    count++;
                    countO++;
                } else if (grid[i][j] == 1){
                    count++;
                    countX++;
                }
            }
        }

        if (count != moveList.size()){
            print("Error! Count == " + count + ", and moveList.size() == " + moveList.size());
            print("\n" + dump());
            int x = 0/0;
        }

        if (count % 2 == 0) {
            if (turn == false) {
                print("Error! Wrong player's turn!");
               print("\n" + dump());
                int x = 0/0;
            }
        } else {
            if (turn == true) {
                print("Error! Wrong player's turn!");
              print("\n" + dump());
                int x = 0/0;
            }
        }

        if (countX < countO) {
            print("Error! CountX == " + countX + ", CountO == " + countO);
            print("\n" + dump());
            int x = 0/0;
        }
    }