![]() |
Conquer Chess
Chess and Starcraft combined
|
#include "user_inputs.h"#include "game.h"#include "game_controller.h"#include "square.h"#include "game_coordinate.h"#include "piece.h"#include "piece_actions.h"#include <cassert>#include <iostream>#include <sstream>
Functions | |
| void | add (user_inputs ¤t, const user_inputs &to_be_added) |
| Add new user inputs. | |
| int | count_user_inputs (const user_inputs &a) |
| Count the total number of control actions to be done by the game, which should be zero after each tick. | |
| void | do_select (game_controller &c, const std::string &square_str, const side player_side) |
| Select a piece. | |
| void | do_select_and_move_piece (game_controller &c, const std::string &from_square_str, const std::string &to_square_str, const side player_side, const physical_controller_type t) |
| Select a piece and move it to a target square. | |
| bool | is_empty (const user_inputs &inputs) noexcept |
| See if the user_inputs} holds zero elements. | |
| void | start_en_passant_attack (game &g, const game_controller &c, const game_coordinate &coordinat, const chess_color player_color) |
| void | start_attack (game &g, const game_controller &c, const game_coordinate &coordinat, const chess_color player_color) |
| Process an A or right-mouse-button down. | |
| void | start_move_unit (game &g, const game_controller &c, const game_coordinate &coordinat, const chess_color player_color) |
| Process an M or right-mouse-button down. | |
| void | test_user_inputs () |
| Test this class and its free functions. | |
| bool | operator== (const user_inputs &lhs, const user_inputs &rhs) noexcept |
| bool | operator!= (const user_inputs &lhs, const user_inputs &rhs) noexcept |
| std::ostream & | operator<< (std::ostream &os, const user_inputs &actions) noexcept |
| void add | ( | user_inputs & | current, |
| const user_inputs & | to_be_added | ||
| ) |
Add new user inputs.
| int count_user_inputs | ( | const user_inputs & | a | ) |
Count the total number of control actions to be done by the game, which should be zero after each tick.
| void do_select | ( | game_controller & | c, |
| const std::string & | square_str, | ||
| const side | player_side | ||
| ) |
Select a piece.
| void do_select_and_move_piece | ( | game_controller & | c, |
| const std::string & | from_square_str, | ||
| const std::string & | to_square_str, | ||
| const side | player_side, | ||
| const physical_controller_type | t | ||
| ) |
Select a piece and move it to a target square.
|
noexcept |
See if the user_inputs} holds zero elements.
|
noexcept |
|
noexcept |
|
noexcept |
| void start_attack | ( | game & | g, |
| const game_controller & | c, | ||
| const game_coordinate & | coordinat, | ||
| const chess_color | player_color | ||
| ) |
Process an A or right-mouse-button down.
| void start_en_passant_attack | ( | game & | g, |
| const game_controller & | c, | ||
| const game_coordinate & | coordinat, | ||
| const chess_color | player_color | ||
| ) |
| void start_move_unit | ( | game & | g, |
| const game_controller & | c, | ||
| const game_coordinate & | coordinat, | ||
| const chess_color | player_color | ||
| ) |
Process an M or right-mouse-button down.
| void test_user_inputs | ( | ) |
Test this class and its free functions.