Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
define display_context interface, implement in game_board
- Loading branch information
Showing
2 changed files
with
47 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
Copyright (C) 2014 by Chris Beck <render787@gmail.com> | ||
Part of the Battle for Wesnoth Project http://www.wesnoth.org/ | ||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 2 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY. | ||
See the COPYING file for more details. | ||
*/ | ||
|
||
/** | ||
* | ||
* This class is an abstract base class designed to simplify the use | ||
* of the display object. | ||
* | ||
**/ | ||
|
||
#ifndef DISPLAY_CONTEXT_HPP_INCLUDED | ||
#define DISPLAY_CONTEXT_HPP_INCLUDED | ||
|
||
#include<vector> | ||
|
||
class team; | ||
class gamemap; | ||
class unit_map; | ||
|
||
class display_context { | ||
public: | ||
virtual const std::vector<team> & teams() const = 0; | ||
virtual const gamemap & map() const = 0; | ||
virtual const unit_map & units() const = 0; | ||
|
||
virtual ~display_context() {} | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters