diff options
author | Kai Stevenson <kai@kaistevenson.com> | 2025-05-07 23:32:50 -0700 |
---|---|---|
committer | Kai Stevenson <kai@kaistevenson.com> | 2025-05-07 23:32:50 -0700 |
commit | 9e0b0da1539575d9f11739a4a886664a2390ddd9 (patch) | |
tree | 9a7b7598a70e7dbf7da0fedaaaa4120f3c578ee7 /tic_tac_toe/src/main.rs | |
parent | b779e3adc0491d25d93dfe5264b7134148a8a888 (diff) |
Diffstat (limited to 'tic_tac_toe/src/main.rs')
-rw-r--r-- | tic_tac_toe/src/main.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tic_tac_toe/src/main.rs b/tic_tac_toe/src/main.rs index d1762ba..5bdb7aa 100644 --- a/tic_tac_toe/src/main.rs +++ b/tic_tac_toe/src/main.rs @@ -9,17 +9,18 @@ use console_helpers::{clear_scrn, write_header}; use std::io; fn render_board(board: &Board) -> () { - println!(" 1 2 3"); + println!("+-1--2--3-+"); let mut y = 1; for row_i in 0..3 { let row: Vec<Tile> = (0..3).map(|col_i| board.state[col_i][row_i]).collect(); - print!("{y} "); + print!("{y}"); for tile in row { print!(" {tile} ") } - println!("\n"); + println!("|\n| |"); y += 1; } + println!("+---------+"); } fn get_coord_input() -> Coord { |