diff --git a/snake-game/src/domain.rs b/snake-game/src/domain.rs index f06be59..678291a 100644 --- a/snake-game/src/domain.rs +++ b/snake-game/src/domain.rs @@ -1,6 +1,6 @@ use bevy::prelude::*; -pub const FRAMES_PER_SECOND: u8 = 2; +pub const FRAMES_PER_SECOND: u8 = 24; pub const GRID_SIZE: u8 = 48; pub const HEAD_SIZE: u8 = (GRID_SIZE as f32 * 1.1) as u8; pub const SNAKE_VELOCITY: u8 = (GRID_SIZE as f32 / 1.0) as u8; @@ -40,9 +40,9 @@ impl Direction { pub fn vector(&self) -> Vec2 { match self { Direction::Up => vec2(0., 1.), - Direction::Right => vec2(-1., 0.), + Direction::Right => vec2(1., 0.), Direction::Down => vec2(0., -1.), - Direction::Left => vec2(1., 0.), + Direction::Left => vec2(-1., 0.), } } } diff --git a/snake-game/src/gameplay.rs b/snake-game/src/gameplay.rs index 14f2753..6a670df 100644 --- a/snake-game/src/gameplay.rs +++ b/snake-game/src/gameplay.rs @@ -38,11 +38,11 @@ pub fn moving(time: Res