Skip to content
Snippets Groups Projects
Commit df6522f4 authored by sven.wikberg's avatar sven.wikberg
Browse files

bug fix messages

parent 3ad61db3
No related branches found
No related tags found
No related merge requests found
...@@ -51,7 +51,7 @@ impl Connect4 { ...@@ -51,7 +51,7 @@ impl Connect4 {
fn choose_game_mode() -> u8 { fn choose_game_mode() -> u8 {
let mut x: i32; let mut x: i32;
loop { loop {
println!("Choose your game mode : (1) Player vs Player. (2) Player vs IA, easy. (3) Player vs IA, hard."); println!("Choose your game mode : (1) Player vs Player. (2) Player vs AI, easy. (3) Player vs AI, hard.");
x = rust_hepia_lib::read_int(); x = rust_hepia_lib::read_int();
match x { match x {
1 | 2 | 3 => return x as u8, 1 | 2 | 3 => return x as u8,
...@@ -351,9 +351,9 @@ impl Connect4 { ...@@ -351,9 +351,9 @@ impl Connect4 {
self.display(); self.display();
if self.last_play_won() { if self.last_play_won() {
if self.is_red_turn() { if self.is_red_turn() {
println!("O won GG !"); println!("X won GG !");
} else { } else {
println!("X won, well played !"); println!("O won, well played !");
} }
break; break;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment