Stock Market Simulator main e8c3612
A game that provides a realistic stock buying experience with unpredictable trends to test investment strategies.
Loading...
Searching...
No Matches
controls.h
Go to the documentation of this file.
1/// @file controls.h
2/// (Declarations of) human-computer interactions functions.
3/*
4This program is free software: you can redistribute it and/or modify it under the
5terms of the GNU Lesser General Public License as published by the Free Software
6Foundation, either version 3 of the License, or (at your option) any later version.
7
8This program is distributed in the hope that it will be useful, but WITHOUT ANY
9WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
11
12You should have received a copy of the GNU Lesser General Public License along with this
13program. If not, see <https://www.gnu.org/licenses/>.
14*/
15
16#ifndef CONTROLS_H
17#define CONTROLS_H
18
19#include "draw.h"
20#include "format.h"
21#include "graph.h"
22#include "stock.h"
23
24#include <ios>
25#include <iostream>
26#include <limits>
27#include <tuple>
28#include <vector>
29
30void optionsInput(int row, int col, float & balance, float tax,
31 std::vector<Stock> & stocks, const std::vector<Stock_event> & events,
32 bool & viewMode, bool & advance, bool & overlayEvent, bool & flush,
33 bool & gameQuit);
34
35int integerInput(int row, int col, const std::string & message);
36
37void buyStocks(int row, int col, float & balance, float tax,
38 std::vector<Stock> & stocks, bool & flush);
39
40void sellStocks(int row, int col, float & balance, float tax,
41 std::vector<Stock> & stocks, bool & flush);
42
43void toggleView(bool & viewMode, bool & flush);
44
45void advanceConfirmation(int row, int col, bool & advance, bool & flush);
46
47void quitConfirmation(int row, int col, bool & flush, bool & gameQuit);
48
49#endif
void buyStocks(int row, int col, float &balance, float tax, std::vector< Stock > &stocks, bool &flush)
Definition controls.cpp:90
void sellStocks(int row, int col, float &balance, float tax, std::vector< Stock > &stocks, bool &flush)
Definition controls.cpp:120
int integerInput(int row, int col, const std::string &message)
Definition controls.cpp:71
void advanceConfirmation(int row, int col, bool &advance, bool &flush)
Definition controls.cpp:154
void optionsInput(int row, int col, float &balance, float tax, std::vector< Stock > &stocks, const std::vector< Stock_event > &events, bool &viewMode, bool &advance, bool &overlayEvent, bool &flush, bool &gameQuit)
Definition controls.cpp:17
void toggleView(bool &viewMode, bool &flush)
Definition controls.cpp:149
void quitConfirmation(int row, int col, bool &flush, bool &gameQuit)
Definition controls.cpp:166
Function declarations for drawing/display of various elements.
Header file for the ANSI Escape code related functions.
Declaration of graph plotting function.
float balance
Player's balance.
Definition main.cpp:68
Declaration of the Stock class.