Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TanTanDev/rusty_demon_attack
/ random
Method
random
src/enemy.rs:44–48 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
42
43
impl EnemyColor {
44
pub fn random() -> Self {
45
use EnemyColor::*;
46
let all = [Purple, Green, Red];
47
all[rand::gen_range(0, all.len())]
48
}
49
}
50
51
pub struct EnemyStateShared {
Callers
1
gl.js
File · 0.80
Calls
no outgoing calls
Tested by
no test coverage detected