Use snprintf and sscanf instead of std::string tomfoolery
Rename order_c to command_c for better readability
This commit is contained in:
parent
b77411121a
commit
8a486fdd40
6 changed files with 71 additions and 127 deletions
|
@ -58,7 +58,7 @@ const char* tests()
|
|||
// Test if we can successfully convert orders back and forth
|
||||
{
|
||||
COrder order;
|
||||
order.order = order_c::F;
|
||||
order.command = command_c::F;
|
||||
order.unit = 10;
|
||||
std::string order_string = GetStringFromOrder(order);
|
||||
COrder order2 = GetOrderFromString(order_string);
|
||||
|
@ -120,7 +120,7 @@ const char* tests()
|
|||
return "Game failed to add valid unit";
|
||||
|
||||
order.unit = id;
|
||||
order.order = order_c::F;
|
||||
order.command = command_c::F;
|
||||
|
||||
if( game.IssueOrder(0,order) )
|
||||
return "Game failed to issue valid order";
|
||||
|
@ -151,7 +151,7 @@ const char* tests()
|
|||
return "Game failed to add valid unit";
|
||||
|
||||
order.unit = id;
|
||||
order.order = order_c::A;
|
||||
order.command = command_c::A;
|
||||
|
||||
if( game.IssueOrder(0,order) )
|
||||
return "Game failed to issue valid order";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue