mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-05 20:40:25 -08:00
depth charge game initial rust implementation
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
use std::io::Write;
|
||||
|
||||
use rand::Rng;
|
||||
|
||||
/** DEPTH CHARGE GAME
|
||||
* https://github.com/marquesrs/basic-computer-games/blob/main/31_Depth_Charge/depthcharge.bas
|
||||
* Direct conversion from BASIC to Rust by Pablo Marques (marquesrs).
|
||||
@@ -10,6 +6,9 @@ use rand::Rng;
|
||||
* 03/03/25
|
||||
*/
|
||||
|
||||
use std::io::Write;
|
||||
use rand::Rng;
|
||||
|
||||
fn input(msg: &str) -> String {
|
||||
print!("{}", msg);
|
||||
let _ =std::io::stdout().flush().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user