I programed for 5 game in (1 match)

Viewed 37

I make game as a beginner but have some issue in it, I programed for 5 game in (1 tournament). After complication it add on in first match (6 matches) now .

I tied several time but confuse how to resolve it please suggest perfect logic on

{[   if(play==5)  ]}   * mark at that place

I debug it too (but I unable connect the logic there.)

                  if (my_move==cop_move)
            {
                System.out.println(" --The game is Tie,");
                System.out.println(" You both choose same Item--\n");
                draw++;
            }
             else if(my_move == 0 && cop_move == 2 || my_move == 2 && cop_move == 1 || my_move ==1 && cop_move == 0)
            {    
                System.out.println(" --Player win the Game-- \n"); 
                my_win++;
            }
             else if(cop_move == 0 && my_move == 2 || cop_move == 2 && my_move == 1 || cop_move ==1 && my_move == 0)
            {    
                System.out.println(" --Computer win the Game-- \n "); 
                cop_win++;
            } 
             else
                {
                    System.out.println(" Invalid input given by Player \n"); 
                }
             if(play==5)
            {
                break;
            }
               play++;
               
           }
              catch(Exception e)
           {
                    System.out.println("Error unwanted input");
                    System.out.println(e);
           }
               
0 Answers
Related