Skip to content

ruqhia/15-game-puzzle

Repository files navigation

15-game-puzzle

15 Puzzle is a game where user moves tiles to rearrange them in a particular order.


This game is programmed in C Programming language, and operates on DE1-SOC computer and ARM processor.


Compiling the Code

  1. Go to CPULator
  2. Select C as the Programming Language
  3. Copy all the codes in 15-puzzle-game.c and paste them into the editor
  4. Compile and Load (F5), then press Continue (F3)

Display

  • VGA: 8 tiles numbered 1-8 will be displayed in a 3x3 block in random order
  • Hex: the timer value is displayed on hex, counting up (time limit is 3 minutes)

How to Play

  • Type PS2 keyboard Right Arrow or Left Arrow to select the tile you want to move.

  • Right Arrow selects clockwise, Left Arrow selects counterclockwise

  • The selected tile is indicated with a thick black frame

  • Type PS2 Enter key to move the tile

  • Selected tile slides to the empty spot

  • Repeat until the tiles are sorted in ascending order (shown below)


    1 2 3
    4 5 6
    7 8

  • If user is able to arrange the tiles within the time limit, “You Win” appears on VGA

  • If time limit is exceeded, “You Lose” appears on VGA

  • Type PS2 Backspace key is used to restart the game (after a game ends) or shuffle the tile arran



Attribution Table

Name Work Done Relative %
Work Done
Ruqhia
  • configured timer interrupts and ISR for timer
  • added images for game board, and win/lose page
  • implemented shuffling option
50
Nancy
  • configured PS2 interrupts and ISR for PS2
  • implemented tile selection and swapping logics
  • implemented animation for tile swapping
50

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages