MCPcopy 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
43impl 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
51pub struct EnemyStateShared {

Callers 1

gl.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected