-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgame_io.h
26 lines (21 loc) · 1004 Bytes
/
game_io.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef GAME_IO_H
#define GAME_IO_H
#include <map>
#include <string>
#include <vector>
#include "game.h"
std::ostream& operator<<(std::ostream& os, const Pyramid& pyramid);
std::ostream& operator<<(std::ostream& os, const Ship& ship);
std::ostream& operator<<(std::ostream& os, const System& system);
std::ostream& operator<<(std::ostream& os, const Action& action);
void print_action(std::ostream& os, const Action& action,
const std::map<int, std::string>& system_names,
std::vector<std::string>::iterator& new_names);
void print_game(std::ostream& os, const Game& game,
const std::map<int, std::string>& system_names);
std::istream& operator>>(std::istream& is, Ship& ship);
std::istream& operator>>(std::istream& is, System& system);
Game* read_game(std::istream& is, std::map<int, std::string>& system_names);
std::string read_action(std::istream& is, Action& action,
std::map<int, std::string>& system_names);
#endif