Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
1 result

assignment-2048

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    h45-taylor authored
    8e655ac6
    History
    Name Last commit Last update
    .gitignore
    2048.cpp
    README.md
    game.hpp
    main.cpp

    2048 Game

    The Rules

    In this Code I am going to be recreating the classic 2048 in a linux command line.

    The Rules

    • If 2 of the same numbers touch they will combine and add up to the value of both added together (e.g. if a 2 block touches another 2 block they will combine and become one 4 block).

    • You can use the 2 common layouts of cursor keys (arrow keys or wasd).

    • If there is no empty cells left with no valid moves then the game will end..

    The Aim

    The aim of the game is to get one of the blocks upto a score of 2048

    How its srtuctured

    First of all the board is created and 2 randomly placed and valued numbers are added