top of page

Create Your First Project

Start adding your projects to your portfolio. Click on "Manage Projects" to get started

2048 Game

December 2024

Hi this is a test text box

CIS 1200 is an introductory computer science course that emphasizes the design aspects of programming. Our final assignment was to create our own game using the Java Swing GUI framework, and I choose to recreate the game 2048.

Screenshot 2025-07-11 at 2.10.30 PM.png
Screenshot 2025-07-11 at 2.10.12 PM.png

When the user clicks on the instructions button this pop up window appears. I used HTML for the formatting this text. 

As the user clicks the arrow keys to combine tiles, if they are the same number they will combine, doubling in value and changing color. After each move, a "2" tile is generated in a random open cell on the board. Once the board is full and there is no more possible moves "Game Over" appears at the top of the board.

Screenshot 2025-07-12 at 1.50.21 PM.png
Screenshot 2025-07-12 at 1.53.09 PM.png

A key part of this game assignemnt was to implement 4 concepts we learned throughout the class. I chose to use File I/O, Collections, 2D Array, and JUnit Testable Component. 

​

File I/O - saved the entire state of my game, allowing the user to save their game and then reopen it. 

​

Collections - used a linkedList to store a collection of game states that allowed me to create an undo button.

​

2D Array - used a 2D integer array to represent the internal state of my board so I could easily move around and change values of the tiles. 

​

JUnit Testable Component - tested my core game logic including my move tile functions and tile generator. 

​

Video of functioning buttons 

Video demonstrating moving tiles

When the user first runs the game, my game board appears in a pop up window that looks like this. It includes multiple buttons such as new game, undo, save, reload, and an instructions pop-up panel. At the top of my game is the current score located on the left, and the users high score on the right. Each time a new game is started the current score resets to 0, but the high score remains from whenever the user reached their top score. 

bottom of page