Giter VIP home page Giter VIP logo

tetrinria's Introduction

tetrinria

A simple tetris implementation for training purpose

build in DEBUG mode

  • mkdir build_debug
  • cd build_debug
  • cmake -DCMAKE_BUILD_TYPE=DEBUG ..
  • make
  • ./gtk/tetris-gtk

build in TEST mode

  • mkdir build_test
  • cd build_test
  • cmake -DCMAKE_BUILD_TYPE=TEST ..
  • make
  • CTEST_OUTPUT_ON_FAILURE=TRUE make test
  • ./gtk/tetris-gtk

tetrinria's People

Contributors

cdoucet avatar stentzel avatar thierry-martinez avatar

Watchers

 avatar  avatar  avatar

tetrinria's Issues

Make test_tetrinria_core.c pass kwstyle script

kwstyle script output:
Processing /home/training/tetrinria/core/test/KWstyle/../../test/test_tetrinria_core.c
Error #0 (63) Line length exceed 85 (max=81)
Error #0 (64) Line length exceed 89 (max=81)
Error #0 (103) Line length exceed 82 (max=81)
Error #0 (167) Line length exceed 85 (max=81)
Error #0 (332) Line length exceed 86 (max=81)
Error #0 (336) Line length exceed 86 (max=81)
Error #0 (436) Line length exceed 87 (max=81)
Error #0 (473) Line length exceed 82 (max=81)
Error #0 (483) Line length exceed 83 (max=81)
Error #0 (495) Line length exceed 82 (max=81)
Error #0 (496) Line length exceed 82 (max=81)
Error #11 (658) Number of spaces before end of line exceed: 4 (max=3)

should be empty

Show grid

  • design grid
  • initialize components
  • draw grid

=> When the game starts, a grid is drawn.

Game over

When the grid is filled, the game ends.
See #2

Line length exceed 81 in game.c and game.h

To be changed:

Result of kwstyle:
"Processing ../../game.c
Error #0 (33) Line length exceed 83 (max=81)
Error #0 (58) Line length exceed 83 (max=81)

Processing ../../game.h
Error #0 (27) Line length exceed 90 (max=81)"

Make grid.c pass kwstyle script

KWstyle output:
Processing /home/training/tetrinria/core/test/KWstyle/../../grid.c
Error #0 (54) Line length exceed 85 (max=81)
Error #0 (148) Line length exceed 85 (max=81)
Error #0 (175) Line length exceed 83 (max=81)
Error #0 (184) Line length exceed 85 (max=81)
Error #0 (198) Line length exceed 83 (max=81)

should be empty

Cleaning to do in game.c - trn_game_check_complete_rows

Those lines are useless? To be checked and maybe removed.

start: line 167
look like: " printf("lines_count: %d\n", lines_count);
printf("score: %d\n", game->score);
trn_game_update_score(game, lines_count);
game->lines_count += lines_count;
printf("lines count: %d\n", game->lines_count);
printf("lines per level: %d\n", LINES_PER_LEVEL * (game->level+1));"

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.