data: sample project updates and fixes

* removed errors from tictactoe sample project
* updated project version of sample projects
This commit is contained in:
mlangkabel
2018-03-20 20:23:48 +01:00
parent 449f90b361
commit ce78412190
4 changed files with 6 additions and 6 deletions
@@ -30,5 +30,5 @@
<use_jre_system_library>1</use_jre_system_library>
</source_group_7a9e75fc-2cad-42d5-8c5b-c86d02f7b4e4>
</source_groups>
<version>4</version>
<version>5</version>
</config>
+1 -1
View File
@@ -4,7 +4,7 @@ int main() {
TicTacToe tictactoe;
while ( tictactoe.Start() ) {
tictactoe.Ru();
tictactoe.Run();
}
return 0;
@@ -18,7 +18,7 @@ bool TicTacToe::Start() {
Reset();
io::stringOut("Tic Tac Toe\n\n[1] Human\n[2] Computer\n[3] Quit\n\n");
player_[0] = SelectPlayer( Field::PlayerA, "Player A" );
players_[0] = SelectPlayer( Field::PlayerA, "Player A" );
if ( !players_[0] ) {
return false;
}
@@ -66,7 +66,7 @@ void TicTacToe::Reset() {
}
}
Player* TicTacToe::SlectPlayer( Field::Token token, const char* name ) const {
Player* TicTacToe::SelectPlayer( Field::Token token, const char* name ) const {
int selection = 0;
while ( true ) {
@@ -77,7 +77,7 @@ Player* TicTacToe::SlectPlayer( Field::Token token, const char* name ) const {
selection = io::numberIn();
switch ( selection ) {
case 1 : return new HuanPlayer( token, name );
case 1 : return new HumanPlayer( token, name );
case 2 : return new ArtificialPlayer( token, name );
case 3 : return 0;
default : io::stringOut("Wrong input!\n");
@@ -38,5 +38,5 @@
<type>C++ Source Group</type>
</source_group_75041cb3-37c8-45c6-bb8a-1b8b79040f59>
</source_groups>
<version>4</version>
<version>5</version>
</config>