summaryrefslogtreecommitdiffstats
path: root/labb5/src/boggleplay.cpp
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2020-11-29 03:28:11 +0100
committerGustav Sörnäs <gustav@sornas.net>2020-11-29 03:28:11 +0100
commit9d5d006302108c07bc3002a1e3f553607f58711b (patch)
treed4fa411ca30ec953a1e2def94fb82ff91a4b6e25 /labb5/src/boggleplay.cpp
parent31a00d19b0b08eb41dce5ee5dc43d0460dffa324 (diff)
downloadtddd86-9d5d006302108c07bc3002a1e3f553607f58711b.tar.gz
check if tied
Diffstat (limited to 'labb5/src/boggleplay.cpp')
-rwxr-xr-xlabb5/src/boggleplay.cpp2
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;
}