Fibonacci Game

    
    

Instructions:

Goal: Reach the last number in the Fibonacci series on the game board (Last number number = (num rows * num columns) - 1 --> index number in the array of Fibonacci numbers). For our 3 by 3 grid, you must reach the Fibonacci number 34 to win.

How to Play:
1. Start the Game:

  • The game board is initially filled with two randomly placed 1s.
  • The Fibonacci series begins with 1, 1.

2. Make a Move:
  • Use the arrow keys (up, down, left, right) to move the numbers.
  • Use the keyboard arrows to move the numbers up, down, left, or right.
  • The numbers will move in the chosen direction, and the game board will be updated.

3. Combine Numbers:
  • When two adjacent non-zero numbers are moved into each other's path, they will combine into a new number.
  • The new number must be part of the Fibonacci series.

4. Winning/Losing:
  • Winning: The game is won when the last number in the Fibonacci series appears on the board.
  • Losing: The game is lost when there are no available spaces to fill with new 1s.

5. Scoreboard:
  • After you have won/lost, your total score (sum of all the Fibonacci numbers on your final board) will be saved and displayed on our player scoreboard.

Array of Fibonacci numbers for reference: 1, 2, 3, 5, 8, 13, 21, 34

Fibonacci Sequence Generator