Skip to content

Conversation

@Gamatek
Copy link

@Gamatek Gamatek commented Nov 23, 2025

This PR adds a Chess game application with:

  • Full chess rules implementation
  • AI opponent using minimax algorithm
  • Graphical interface with piece sprites

Copilot AI review requested due to automatic review settings January 19, 2026 17:45
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds a comprehensive Chess game application with full chess rules implementation, an AI opponent using the minimax algorithm with alpha-beta pruning, and a graphical interface with piece sprites.

Changes:

  • Added complete chess game with board representation, move generation, and legal move validation
  • Implemented minimax AI with configurable difficulty levels and position evaluation
  • Created graphical UI with piece rendering, move indicators, and game state display

Reviewed changes

Copilot reviewed 26 out of 42 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
apps/apps.js Registers Chess app in the application list
apps/Chess/main.c Main game loop and user interaction handling
apps/Chess/ui.c, ui.h Rendering system for board, pieces, and UI elements
apps/Chess/board.c, board.h Board state management and piece movement
apps/Chess/moves.c, moves.h Legal move generation and check detection
apps/Chess/minimax.c, minimax.h AI opponent with position evaluation
apps/Chess/chess_defs.h Core constants and data structures
apps/Chess/sources.mak Build configuration
apps/Chess/img2h.py Python script to convert PNG images to C headers
apps/Chess/icon.png, icon.xcf Application icon files
apps/Chess/assets/*.png, *.h Chess piece sprites and generated headers

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

#define VAL_Q 90
#define VAL_K 900

unsigned int boardConter = 1;
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable 'boardConter' is misspelled. It should be 'boardCounter' for consistency and clarity.

Copilot uses AI. Check for mistakes.
return 1;
}

Move *castelingMove(char board[BOARD_SIZE][BOARD_SIZE], int color, int side, Move *moves)
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable name 'castelingMove' is misspelled. It should be 'castlingMove' (with no 'e' after 'castl').

Copilot uses AI. Check for mistakes.
Comment on lines +72 to +73
except Exception:
print(f"Error converting {png_file}: {Exception}")
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exception variable is being used in the f-string but is not properly referenced. The code should be: print(f"Error converting {png_file}: {e}") with 'e' as the exception variable in the except clause.

Copilot uses AI. Check for mistakes.
break;
}

// Run Minimax avec difficulté variable
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment on line 140 mentions 'Run Minimax avec difficulté variable' which mixes English and French. The comment should be fully in English: 'Run Minimax with variable difficulty'.

Copilot uses AI. Check for mistakes.
f.write("#include <stdint.h>\n\n")

# Write pixel data
f.write("const uint16_t {variable_name}_data[] = {{\n")
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The f-string is missing the opening 'f' prefix. The line should be: f.write(f"const uint16_t {variable_name}_data[] = {{\n") to properly format the variable name.

Copilot uses AI. Check for mistakes.
Copy link
Member

@Yaya-Cout Yaya-Cout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, didn't review in detail as it's an external app, but it runs fine and code seems mostly clean.

@Yaya-Cout Yaya-Cout merged commit 0f8f827 into UpsilonNumworks:master Jan 20, 2026
0 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants