Project Overview
As mentioned above, our project was to design a two-player interactive Connect 4 game. This involved interfacing with hardware both on and off the MPC823 board. Off the board, we interfaced with the LCD screen as well as Nintendo 8 and Nintendo 64 controllers. When the game begins, the LCD screen displays an empty board in the center with claws holding the game pieces for player 1 and player 2. One each side of the screen, the players' information is displayed, with player 1 being on the left and player 2 on the right. The information includes the controller type being used and the time left until another piece may be dropped. The controller information is generated on the first poll of each controller, and the time counts down from 5 each time a player drops his or her game piece. Dropping is allowed when the time is equal to zero. An additional feature that we added is the ability to reset the game based on a combination of buttons pressed on either player's controller.
The game ends when one player is able to get a sequence of 4 of his or her resepective game pieces in a row, either horizontally, vertically, or diagonally.