Coder Social home page Coder Social logo

lovenek0 / ucode-endgame-2048 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 68 KB

A classic 2048 game created for the final stage of the UCode-Marathon EndGame.

License: GNU Lesser General Public License v2.1

Makefile 1.32% C 98.68%
ncurses c 2048-game 2048 game console ucode-marathon ucode-connect

ucode-endgame-2048's Introduction

UCode EndGame 2048

Intro

  • The game was created for the last stage of UCode-Matathon 2021 - EndGame.
  • The game was rated 100 points by 3 reviewers and 100 points from Oracle.
  • The presentation was rated at 131 points by 25 participants.
  • Total score: 113.

Presentation can be found there: final_presentation.pptx

Authors

Compiling and Run

  1. Before compiling you must install necessary libraries and packages. For that execute command:
    sudo apt-get install libncurses5-dev libncursesw5-dev clang cmake
  2. Clone repo and go to it`s directory by executing:
    git clone https://github.com/LoveNek0/UCode-EndGame-2048.git
    cd UCode-EndGame-2048 
  3. For compile you must execute command:
    make all 
  4. For running execute:
    ./endgame
    If after starting the game you see the text error: console size must be more then 82x32, then this means that you need to increase the size of the terminal window.

Gameplay

Description and Rules

2048 is a game where you combine numbered tiles in order to gain a higher numbered tile. In this game you start with two tiles, the lowest possible number available is two. Then you will play by combining the tiles with the same number to have a tile with the sum of the number on the two tiles.

  • In each round, a tile of denomination "2" (with a probability of 90%) or "4" (with a probability of 10%) appears.
  • By pressing the arrow, the player can throw off all the tiles of the playing field in one of 4 directions. If, when dropped, two tiles of the same denomination "bump" into one another, then they turn into one, the denomination of which is equal to the sum of the connected tiles. After each move on the free section of the field, a new tile with a face value of "2" or "4" appears. If, when the button is pressed, the location of the tiles or their denomination does not change, then the move is not made.
  • If there are more than two tiles of the same denomination in one line or in one column, then when dropped, they begin to connect from the side to which they were directed. For example, tiles (4, 4, 4) in the same row will turn into (8, 4) after the left move, and into (4, 8) after the right move. This processing of ambiguity allows you to more accurately form the strategy of the game.
  • For each connection, game points are increased by the face value of the resulting tile.
  • The game ends in defeat if after the next move it is impossible to perform an action.

Control

  • W - Move up
  • S - Move down
  • A - Move left
  • D - Move right
  • Q - Quit
  • Space/Enter - Select item

Screenshots

ucode-endgame-2048's People

Contributors

lovenek0 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.