This project was made for the CPSC 210 course that I took in my first year, second semester at UBC. This project has taught me many aspects of coding such as systematic program design, testing and working with proper deadlines.
This project will recreate the Connect 4 game with unique twists that makes it different to the classical game. It will contain unique gamemodes that include time constraints, different chips to make the game more interesting, boards where gravity acts differently, and much more. The intended users are people looking to have a competitive yet relaxing time playing a new version of Connect 4 that will always keep them engaged with its variety of playstyles. This version of Connect 4 will feature an indefinite amount of chips as the different gamemodes and special chips will make it hard for the game to progress with only 21 chips per person.
I am interested in creating this project because during summertime, when I visit my grandmother's village, me and my cousins play various boardgames every night. One of the boardgames we play most often is Connect 4. However, the classical Connect 4 gets boring sometimes. Hence, I'm making a better version with different gamemodes and unique chips to always keep the players entertained.
-
As a user, I want to add a chip to the grid when it's my turn.
-
As a user, I want to view the current state of the grid after every move.
-
As a user, I want to be notified when the game ends and view which player won.
-
As a user, I want to reset the board after the game ends so I can start a new game without restarting the app.
-
As a user, I want to switch turns automatically so 2 players can play together.
-
As a user, I want to be able to save the current state of the game and also players and their stats whenever they get updated.
-
As a user, I want to be able to load saved game instances and saved users with their saved stats.
- You can generate the first required action related to the user story "adding multiple Xs to a Y" by loading into a game, inputting the number for the row/column, and pressing the button to play the turn. This allows the user to add multiple chips to the grid.
- You can generate the second required action related to the user story "adding multiple Xs to a Y" by loading into a game, waiting for a Clearer/Stealer chip to spawn, entering the number for the row and column, and pressing the button to play the turn. This allows the user to clear a quadrant in the grid from a chip and replace it with another chip.
- You can generate the third required action related to the user story "adding multiple Xs to a Y" by loading into a game, waiting for a Column/Row/Ultimate Destroyer chip to spawn, entering the number for the column, and pressing the button to play the turn. This allows the user to clear a row/column in the grid from any chips.
- You can locate my visual components by going to the assets folder in the project directory.
- You can save the state of my application by creating a new game, pressing the pause button on the top left, and saving it.
- You can reload the state of my application by pressing the load game button in the menu, and pressing resume on the desired game.
Sun Mar 30 13:28:28 PDT 2025
Added Ultimate Destroyer Chip to grid[5][0] for Player priyu
Sun Mar 30 13:28:29 PDT 2025
Added Normal Chip to grid[5][1] for Player arushi
Sun Mar 30 13:28:32 PDT 2025
Added Anti Grav Chip to grid[1][1] for Player priyu
Sun Mar 30 13:28:35 PDT 2025
Cleared chip at grid[5][0]
Sun Mar 30 13:28:37 PDT 2025
Added Normal Chip to grid[1][1] for Player priyu
Sun Mar 30 13:28:41 PDT 2025
Cleared chip at grid[5][1]
Sun Mar 30 13:28:45 PDT 2025
Added Stealer Chip to grid[4][1] for Player priyu
If I had more time to work on this project, one thing I would improve on is the organization of the scripts in the UI folder. I rushed through the GUI making process and as a result, my GUI code was quite messy and very long, having repeted segments of code and other hard-to-read pieces of code scattered around. I could make a parent class to put all the duplicate code that the GUI and CLI versions of the UI scripts share. Refactoring these ideas would make the code much neater and easier for others to work with.
