Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
Functions
user_input.cpp File Reference
#include "user_input.h"
#include "game_coordinate.h"
#include <cassert>
#include <iostream>
#include <sstream>
#include <map>
Include dependency graph for user_input.cpp:

Functions

user_input create_mouse_move_action (const game_coordinate &coordinat, const side player)
 The only user_input with a coordinat.
 
user_input create_press_action_1 (const side player)
 Do action 1 with keyboard on the square where the player's cursor is.
 
user_input create_press_action_2 (const side player)
 
user_input create_press_action_3 (const side player)
 
user_input create_press_action_4 (const side player)
 
user_input create_press_down_action (const side player)
 
user_input create_press_left_action (const side player)
 
user_input create_press_lmb_action (const side player)
 Do LMB action on the square where the player's cursor is.
 
user_input create_press_right_action (const side player)
 
user_input create_press_rmb_action (const side player)
 
user_input create_press_up_action (const side player)
 
user_input create_random_user_input (std::default_random_engine &rng_engine)
 
user_input create_useful_random_user_input (std::default_random_engine &rng_engine)
 Less random, more likely to be useful.
 
user_input get_user_input_to_do_action_1 (const side player_side, const physical_controller_type t)
 Create the user inputs to do action_1 at the square at the cursor.
 
user_input get_user_input_to_select (const side player_side, const physical_controller_type t)
 Create the user inputs to select the square at the cursor.
 
void test_user_input ()
 Test the 'control_action' class and its free functions.
 
bool operator== (const user_input &lhs, const user_input &rhs) noexcept
 
std::ostream & operator<< (std::ostream &os, const user_input &a) noexcept
 

Function Documentation

◆ create_mouse_move_action()

user_input create_mouse_move_action ( const game_coordinate coordinat,
const side  player 
)

The only user_input with a coordinat.

◆ create_press_action_1()

user_input create_press_action_1 ( const side  player)

Do action 1 with keyboard on the square where the player's cursor is.

See also
Use move_cursor_to} to put the cursor at the square to act upon

◆ create_press_action_2()

user_input create_press_action_2 ( const side  player)

◆ create_press_action_3()

user_input create_press_action_3 ( const side  player)

◆ create_press_action_4()

user_input create_press_action_4 ( const side  player)

◆ create_press_down_action()

user_input create_press_down_action ( const side  player)

◆ create_press_left_action()

user_input create_press_left_action ( const side  player)

◆ create_press_lmb_action()

user_input create_press_lmb_action ( const side  player)

Do LMB action on the square where the player's cursor is.

See also
Use move_cursor_to} to put the cursor at the square to act upon

◆ create_press_right_action()

user_input create_press_right_action ( const side  player)

◆ create_press_rmb_action()

user_input create_press_rmb_action ( const side  player)

◆ create_press_up_action()

user_input create_press_up_action ( const side  player)

◆ create_random_user_input()

user_input create_random_user_input ( std::default_random_engine &  rng_engine)

◆ create_useful_random_user_input()

user_input create_useful_random_user_input ( std::default_random_engine &  rng_engine)

Less random, more likely to be useful.

◆ get_user_input_to_do_action_1()

user_input get_user_input_to_do_action_1 ( const side  player_side,
const physical_controller_type  t 
)

Create the user inputs to do action_1 at the square at the cursor.

◆ get_user_input_to_select()

user_input get_user_input_to_select ( const side  player_side,
const physical_controller_type  t 
)

Create the user inputs to select the square at the cursor.

◆ operator<<()

std::ostream & operator<< ( std::ostream &  os,
const user_input a 
)
noexcept

◆ operator==()

bool operator== ( const user_input lhs,
const user_input rhs 
)
noexcept

◆ test_user_input()

void test_user_input ( )

Test the 'control_action' class and its free functions.