| Summary: | The program will produce more than 2 players | ||
|---|---|---|---|
| Product: | CS3343 Chinese Checker | Reporter: | yutongmen2-c |
| Component: | Algorithm Component | Assignee: | yutongmen2-c |
| Status: | CONFIRMED --- | ||
| Severity: | minor | CC: | yutongmen2-c |
| Priority: | --- | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | The image indicates that more than 2 players are counted by the program. | ||
Wrong Implementation:
System.out.println("Player " + TurnCounter.getTurn() + " is playing.");
Correct implementation:
System.out.println("Player " + (2 - TurnCounter.getTurn()%2) + " is playing.");
|
Created attachment 88 [details] The image indicates that more than 2 players are counted by the program. The image indicates that more than 2 players are counted by the program. The program prompt the 3rd player to play the move in turn 3. Steps to reproduce: 1. Start the game. 2. Input 0 3 3. Choose 0 4 4. Input 0 4 5. Choose 1 3 Actual outcome: The program prints: "Player 3 is playing." Expected outcome: The program prints: "Player 1 is playing."