Describe the bug
Choosing one player starts the two-player loop. After the first legal move, the game prompts the user to enter a move for CPU.
To reproduce
- Run
python "Connect Four/connectfour.py".
- Choose
1 player and enter a name such as Ada.
- Enter a legal column such as
4.
- The next prompt asks for
CPU's input.
Expected behavior
Single-player mode should use the existing computer-turn loop so the CPU chooses its own column.
Proposed fix
Call gamePlayOnePlayer from the one-player branch and leave the two-player branch unchanged.
Describe the bug
Choosing one player starts the two-player loop. After the first legal move, the game prompts the user to enter a move for
CPU.To reproduce
python "Connect Four/connectfour.py".1player and enter a name such asAda.4.CPU's input.Expected behavior
Single-player mode should use the existing computer-turn loop so the CPU chooses its own column.
Proposed fix
Call
gamePlayOnePlayerfrom the one-player branch and leave the two-player branch unchanged.