Skip to content

Latest commit

 

History

History
2 lines (2 loc) · 696 Bytes

README.md

File metadata and controls

2 lines (2 loc) · 696 Bytes

Connect4

Simple two player connect 4 game. Uses a 2D array to organize each square in the grid. Uses for loops to check for a win. Uses only one class aside from Main. Int numClicks is used to decide which color to use, even numbers mean to use red and odd numbers mean to use yellow. Game can be launched by creating a new Connect4(boolean debug) object, pass false as an argument unless debugging. Each button contains an actionListener. When a button is clicked, the lowest button in that column that is still blue will be changed to the appropriate color, and it will run the checkForWin method. The coordinate, color, and debug will be passed as an argument so the method can access this.