MCPcopy Create free account
hub / github.com/CleanCut/invaders / new

Method new

src/player.rs:16–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14
15impl Player {
16 pub fn new() -> Self {
17 Self {
18 x: NUM_COLS / 2,
19 y: NUM_ROWS - 1,
20 shots: Vec::new(),
21 }
22 }
23 pub fn move_left(&mut self) {
24 if self.x > 0 {
25 self.x -= 1;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected