diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2020-11-29 03:28:11 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2020-11-29 03:28:11 +0100 |
| commit | 9d5d006302108c07bc3002a1e3f553607f58711b (patch) | |
| tree | d4fa411ca30ec953a1e2def94fb82ff91a4b6e25 /labb5 | |
| parent | 31a00d19b0b08eb41dce5ee5dc43d0460dffa324 (diff) | |
| download | tddd86-9d5d006302108c07bc3002a1e3f553607f58711b.tar.gz | |
check if tied
Diffstat (limited to 'labb5')
| -rwxr-xr-x | labb5/src/boggleplay.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/labb5/src/boggleplay.cpp b/labb5/src/boggleplay.cpp index 21b3172..3bb1134 100755 --- a/labb5/src/boggleplay.cpp +++ b/labb5/src/boggleplay.cpp @@ -91,6 +91,8 @@ void playOneGame(Boggle& boggle) { cout << endl; if (boggle.get_computer_score() > boggle.get_user_score()) { cout << "Ha ha ha, I destroyed you. Better luck next time, puny human!" << endl; + } else if (boggle.get_computer_score() == boggle.get_user_score()) { + cout << "Close one!" << endl; } else { cout << "WOW, you defeated me! Congratulations!" << endl; } |
