-
-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #163 from themmj/master
Add missing const qualifiers, unify code style
- Loading branch information
Showing
25 changed files
with
419 additions
and
279 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 |
---|---|---|
@@ -1,31 +1,45 @@ | ||
#ifndef annotate_h | ||
#define annotate_h | ||
#include <string> | ||
namespace lux { | ||
|
||
namespace lux | ||
{ | ||
using namespace std; | ||
class Annotate { | ||
|
||
class Annotate | ||
{ | ||
public: | ||
static string circle(int x, int y) { | ||
static string circle(int x, int y) | ||
{ | ||
return "dc " + to_string(x) + " " + to_string(y); | ||
}; | ||
static string x(int x, int y) { | ||
} | ||
|
||
static string x(int x, int y) | ||
{ | ||
return "dx " + to_string(x) + " " + to_string(y); | ||
}; | ||
static string line(int x1, int y1, int x2, int y2) { | ||
} | ||
|
||
static string line(int x1, int y1, int x2, int y2) | ||
{ | ||
return "dl " + to_string(x1) + " " + to_string(y1) + " " + to_string(x2) + " " + to_string(y2); | ||
}; | ||
static string text(int x1, int y1, string message) { | ||
} | ||
|
||
static string text(int x1, int y1, string message) | ||
{ | ||
return "dt " + to_string(x1) + " " + to_string(y1) + " '" + message + "' 16"; | ||
}; | ||
static string text(int x1, int y1, string message, int fontsize) { | ||
} | ||
|
||
static string text(int x1, int y1, string message, int fontsize) | ||
{ | ||
return "dt " + to_string(x1) + " " + to_string(y1) + " '" + message + "' " + to_string(fontsize); | ||
}; | ||
static string sidetext(string message) { | ||
} | ||
|
||
static string sidetext(string message) | ||
{ | ||
return "dst '" + message + "'"; | ||
}; | ||
} | ||
}; | ||
}; | ||
// string lux::Annotate::circle(int x, int y) | ||
} | ||
|
||
|
||
#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
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 |
---|---|---|
|
@@ -78,4 +78,5 @@ namespace lux | |
}; | ||
static const DIRECTIONS ALL_DIRECTIONS[] = { NORTH, EAST, SOUTH, WEST }; | ||
}; | ||
|
||
#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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,27 @@ | ||
#include "kit.hpp" | ||
#include <map> | ||
#include <ostream> | ||
#include <string> | ||
|
||
namespace kit | ||
{ | ||
using namespace std; | ||
string INPUT_CONSTANTS::DONE = "D_DONE"; | ||
string INPUT_CONSTANTS::RESOURCES = "r"; | ||
string INPUT_CONSTANTS::RESEARCH_POINTS = "rp"; | ||
string INPUT_CONSTANTS::UNITS = "u"; | ||
string INPUT_CONSTANTS::CITY = "c"; | ||
string INPUT_CONSTANTS::CITY_TILES = "ct"; | ||
string INPUT_CONSTANTS::ROADS = "ccd"; | ||
using namespace std; | ||
|
||
string INPUT_CONSTANTS::DONE = "D_DONE"; | ||
string INPUT_CONSTANTS::RESOURCES = "r"; | ||
string INPUT_CONSTANTS::RESEARCH_POINTS = "rp"; | ||
string INPUT_CONSTANTS::UNITS = "u"; | ||
string INPUT_CONSTANTS::CITY = "c"; | ||
string INPUT_CONSTANTS::CITY_TILES = "ct"; | ||
string INPUT_CONSTANTS::ROADS = "ccd"; | ||
} | ||
|
||
namespace lux | ||
{ | ||
using namespace std; | ||
|
||
ostream &operator<<(ostream &out, const Position &p) | ||
ostream &operator<<(ostream &out, const Position &p) | ||
{ | ||
out << "(" << p.x << "," << p.y << ")"; // access private data | ||
out << "(" << p.x << "," << p.y << ")"; | ||
return out; | ||
}; | ||
} |
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
Oops, something went wrong.