Have you ever played the popular 2048 game? It is a single-player sliding block puzzle game designed by the Italian web developer Gabriele Cirulli.

computer science

Description

1 Introduction 

Have you ever played the popular 2048 game? It is a single-player sliding block puzzle game designed by the Italian web developer Gabriele Cirulli. The game’s objective is to slide numbered tiles on a grid to combine them to create a tile with the number 2048. Fig. 1 shows a sample screen shot of the game. You can try to play the game online. You can read more about the game at 2048 wiki.


2048 was originally written in JavaScript and CSS during a weekend. Your task is to implement the 2048 game with MIPS assembly within a month. Hope you enjoy the fun! 


2 Game Rules 

2.1 The Sliding 

Operation 2048 is played on a 4×4 grid, with numbered tiles that slide smoothly when a player moves them to either up, down, left or right direction. 


Tiles slide as far as possible in the chosen direction until they are stopped by either another tile or the edge of the grid. For example, [2, 0, 4, 0] → [0, 0, 2, 4], where → denotes a sliding right operation and 0 is an empty tile.


Related Questions in computer science category