reversi.h 420 B

123456789101112131415161718192021
  1. #pragma once
  2. #include <furi.h>
  3. #include <stdbool.h>
  4. #define BLACK 1
  5. #define WHITE -1
  6. #define BOARD_SIZE 8
  7. typedef struct {
  8. int8_t board[BOARD_SIZE][BOARD_SIZE];
  9. int8_t current_player;
  10. int8_t human_color;
  11. uint8_t cursor_x;
  12. uint8_t cursor_y;
  13. uint8_t is_game_over;
  14. } GameState;
  15. void init_game(GameState* state);
  16. void computer_move(GameState* game_state);
  17. void human_move(GameState* game_state);