pseudocode algo for the game
This commit is contained in:
+23
-1
@@ -1,7 +1,29 @@
|
||||
// a chess implementation in pure C :)
|
||||
|
||||
#include <stdio.h>
|
||||
#include "util.h"
|
||||
#include "chess.h"
|
||||
|
||||
/**
|
||||
* steps to victory:
|
||||
* 1. init the board with the default config
|
||||
* 2. game loop
|
||||
* 2a. select the current player (if first round - white starts)
|
||||
* 2b. wait for the movement of the current player
|
||||
* 2c. once a move is registered, perform it IF POSSIBLE
|
||||
* 2d. check for captures and/or promotions and/or mates (check, stale...)
|
||||
* 2e. if there is an end condition that is met, end the game; announce
|
||||
* the results
|
||||
*/
|
||||
|
||||
int main() {
|
||||
board_t board;
|
||||
bool running = true;
|
||||
|
||||
init_board(&board);
|
||||
|
||||
while (running) {
|
||||
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
Reference in New Issue
Block a user