src/PentagoGame/Run.java
/**
     * Get coordinate and other things from player
     * @param player1 is a player (Player that is his/her turn)
     * @param mainBoard is Our mainBoard that we play on
     */
Get coordinate and other things from player
@param player1 is a player (Player that is his/her turn)
@param mainBoard is Our mainBoard that we play on
Get coordinate and other things from player @param player1 is a player ( Player that is his / her turn ) @param mainBoard is Our mainBoard that we play on
public static void turn(Player player1 , MainBoard mainBoard)
    {
        Scanner scanner = new Scanner(System.in);
        System.out.print(player1.getPlayerColor() +" Choose a Block & Choose a Coordinate (Ex: 1 5 --> left Up Center) : " );
        int blockNumber = Integer.parseInt(scanner.next());
        int coordinate = Integer.parseInt(scanner.next());
        int moveX=0;
        int moveY=0;
        switch (coordinate)
        {
            case 1:
                player1.addDisc(0+moveX,0+moveY,blockNumber,mainBoard);
                break;
            case 2:
                player1.addDisc(0+moveX,1+moveY,blockNumber,mainBoard);
                break;
            case 3:
                player1.addDisc(0+moveX,2+moveY,blockNumber,mainBoard);
                break;
            case 4:
                player1.addDisc(1+moveX,0+moveY,blockNumber,mainBoard);
                break;
            case 5:
                player1.addDisc(1+moveX,1+moveY,blockNumber,mainBoard);
                break;
            case 6:
                player1.addDisc(1+moveX,2+moveY,blockNumber,mainBoard);
                break;
            case 7:
                player1.addDisc(2+moveX,0+moveY,blockNumber,mainBoard);
                break;
            case 8:
                player1.addDisc(2+moveX,1+moveY,blockNumber,mainBoard);
                break;
            case 9:
                player1.addDisc(2+moveX,2+moveY,blockNumber,mainBoard);
                break;
        }
        Boolean win = mainBoard.checkWin(player1);
        if (!win)
        {
            System.out.print("\n1) Rotate Clock wise -- 2) Rotate counter Clock wise & your prefer block : ");
            int rotate = Integer.parseInt(scanner.next());
            int cBlock = Integer.parseInt(scanner.next());
            if (rotate == 1)
            {
                player1.rotateClock(cBlock,mainBoard);
            }
            else if (rotate == 2)
            {
                player1.rotateOpposite(cBlock,mainBoard);
            }
            else
            {
                System.out.println("Wrong Input");
            }
        }
        else
        {
            System.out.println("Player " + player1.getPlayerColor() + " Won");
            System.exit(0);
        }
    }
public static void turn ( Player player1 , MainBoard mainBoard ) { Scanner scanner = new Scanner ( System . in ) ; System . out . print ( player1 . getPlayerColor ( ) + " Choose a Block & Choose a Coordinate (Ex: 1 5 --> left Up Center) : " ) ; int blockNumber = Integer . parseInt ( scanner . next ( ) ) ; int coordinate = Integer . parseInt ( scanner . next ( ) ) ; int moveX = 0 ; int moveY = 0 ; switch ( coordinate ) { case 1 : player1 . addDisc ( 0 + moveX , 0 + moveY , blockNumber , mainBoard ) ; break ; case 2 : player1 . addDisc ( 0 + moveX , 1 + moveY , blockNumber , mainBoard ) ; break ; case 3 : player1 . addDisc ( 0 + moveX , 2 + moveY , blockNumber , mainBoard ) ; break ; case 4 : player1 . addDisc ( 1 + moveX , 0 + moveY , blockNumber , mainBoard ) ; break ; case 5 : player1 . addDisc ( 1 + moveX , 1 + moveY , blockNumber , mainBoard ) ; break ; case 6 : player1 . addDisc ( 1 + moveX , 2 + moveY , blockNumber , mainBoard ) ; break ; case 7 : player1 . addDisc ( 2 + moveX , 0 + moveY , blockNumber , mainBoard ) ; break ; case 8 : player1 . addDisc ( 2 + moveX , 1 + moveY , blockNumber , mainBoard ) ; break ; case 9 : player1 . addDisc ( 2 + moveX , 2 + moveY , blockNumber , mainBoard ) ; break ; } Boolean win = mainBoard . checkWin ( player1 ) ; if ( ! win ) { System . out . print ( "\n1) Rotate Clock wise -- 2) Rotate counter Clock wise & your prefer block : " ) ; int rotate = Integer . parseInt ( scanner . next ( ) ) ; int cBlock = Integer . parseInt ( scanner . next ( ) ) ; if ( rotate == 1 ) { player1 . rotateClock ( cBlock , mainBoard ) ; } else if ( rotate == 2 ) { player1 . rotateOpposite ( cBlock , mainBoard ) ; } else { System . out . println ( "Wrong Input" ) ; } } else { System . out . println ( "Player " + player1 . getPlayerColor ( ) + " Won" ) ; System . exit ( 0 ) ; } }
Get coordinate and other things from player
 @param player1 is a player (Player that is his/her turn)
 @param mainBoard is Our mainBoard that we play on
Get coordinate and other things from player @param player1 is a player ( Player that is his / her turn ) @param mainBoard is Our mainBoard that we play on