A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
graphlib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
.
[graphlib.git]
/
chateaux
/
chateaux.cpp
diff --git
a/chateaux/chateaux.cpp
b/chateaux/chateaux.cpp
index
7f4d093
..
44e22d4
100644
(file)
--- a/
chateaux/chateaux.cpp
+++ b/
chateaux/chateaux.cpp
@@
-321,8
+321,10
@@
void jeu(DrawingWindow& w)
w.sleep(2);
else {
char r;
- std::cout << "Recommencer (o/n) ? ";
- std::cin >> r;
+ do {
+ std::cout << "Recommencer (o/n) ? ";
+ std::cin >> r;
+ } while (std::cin.good() && r != 'o' && r != 'n');
rejouer = r == 'o';
}
} while (rejouer);