Giter VIP home page Giter VIP logo

alpha's People

Contributors

k-takami42 avatar kazu-42 avatar

Watchers

 avatar

alpha's Issues

[reviews] tetris/srcs/tetris_print.c

Comments

Static Badge for 文 の 統一

1箇所、単一処理の for 文で brace が省略されているようです
ここは全体通して どちらかへ統一させた方が良さそうに思いましたがいかがでしょうか?

for (int c = 0; c < (WIN_SIZE - title_len) / 2; c++)
printw(" ");

for (int c = 0; c < COL_SIZE; c++) {
printw_cell(board[r][c]);
}

Static Badge

全体通して、かなりきれいなコードだと思いました( ^ω^)スバラッ

[reviews] Comment Line

Comments

Static Badge コメント行について

かなり細かな指摘となりますが、いくつかコメント前後のスペースの漏れが気になりました
揃えて置くと全体通してより読みやすくなると感じました

static void clear_line(const int row, t_board board) {
//move all rows above down one row
//move backwards to achieve a non-destructive manner.
for (int r = row; r >= 1; r--)
for (int c = 0; c < COL_SIZE; c++)
board[r][c] = board[r - 1][c];
//clear the first row
for (int c = 0; c < COL_SIZE; c++)
board[0][c] = 0;
}

static void clear_line(const int row, t_board board) {
-   //move all rows above down one row
-   //move backwards to achieve a non-destructive manner.
+   // move all rows above down one row
+   // move backwards to achieve a non-destructive manner.
    for (int r = row; r >= 1; r--)
        for (int c = 0; c < COL_SIZE; c++)
            board[r][c] = board[r - 1][c];
-   //clear the first row
+   // clear the first row
    for (int c = 0; c < COL_SIZE; c++)
        board[0][c] = 0;
}

clear();// clears curses window

-    clear();// clears curses window
+    clear(); // clears curses window

init_pair(TETROMINO_L, COLOR_BLACK, COLOR_WHITE);// shape L is orange but ncurses doesn't have orange color

-        init_pair(TETROMINO_L, COLOR_BLACK, COLOR_WHITE);// shape L is orange but ncurses doesn't have orange color
+        init_pair(TETROMINO_L, COLOR_BLACK, COLOR_WHITE); // shape L is orange but ncurses doesn't have orange color

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.