take the pawns at home into account when deciding if the user can choose a pawn
This commit is contained in:
@@ -89,7 +89,7 @@ void Engine::nextTurn() {
|
||||
|
||||
std::string choice;
|
||||
bool pawnMoved = false;
|
||||
switch (currentPlayer.pawnsActive) {
|
||||
switch (currentPlayer.pawnsActive + currentPlayer.pawnsAtHome) {
|
||||
|
||||
// 0 pionków na planszy - musi wyjść pionkiem
|
||||
case 0:
|
||||
@@ -147,13 +147,13 @@ void Engine::nextTurn() {
|
||||
this->pawnmoveBuffer.play();
|
||||
this->board.smartSleep(2000);
|
||||
break;
|
||||
} else {
|
||||
std::cout << "Ups! Nie mozesz tego zrobic!\n";
|
||||
std::cout << "Jedyna opcja to zagranie kolejnym pionkiem.\n";
|
||||
} else {
|
||||
std::cout << "Ups! Nie mozesz tego zrobic!\n";
|
||||
std::cout << "Jedyna opcja to zagranie kolejnym pionkiem.\n";
|
||||
this->invalidBuffer.play();
|
||||
this->board.smartSleep(1000);
|
||||
// Zróbmy to, co w a)
|
||||
pickAPlace = false;
|
||||
// Zróbmy to, co w a)
|
||||
pickAPlace = false;
|
||||
std::cout << currentPlayer.getName() << " wychodzi "
|
||||
<< currentPlayer.pawnsActive + 1 << ". pionkiem z bazy.\n";
|
||||
// Rusz pierwszy możliwy pionek w bazie:
|
||||
|
||||
Reference in New Issue
Block a user