mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-12 15:50:20 -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
|
/** DEPTH CHARGE GAME
|
||||||
* https://github.com/marquesrs/basic-computer-games/blob/main/31_Depth_Charge/depthcharge.bas
|
* https://github.com/marquesrs/basic-computer-games/blob/main/31_Depth_Charge/depthcharge.bas
|
||||||
* Direct conversion from BASIC to Rust by Pablo Marques (marquesrs).
|
* Direct conversion from BASIC to Rust by Pablo Marques (marquesrs).
|
||||||
@@ -10,6 +6,9 @@ use rand::Rng;
|
|||||||
* 03/03/25
|
* 03/03/25
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use std::io::Write;
|
||||||
|
use rand::Rng;
|
||||||
|
|
||||||
fn input(msg: &str) -> String {
|
fn input(msg: &str) -> String {
|
||||||
print!("{}", msg);
|
print!("{}", msg);
|
||||||
let _ =std::io::stdout().flush().unwrap();
|
let _ =std::io::stdout().flush().unwrap();
|
||||||
|
|||||||
Reference in New Issue
Block a user