Browse Source

Animation is now Optically Illusive

master
iamsosmart19 4 years ago
parent
commit
331331d555
  1. 6
      src/main.rs

6
src/main.rs

@ -15,7 +15,7 @@ struct Apr {
fn make_grid(ctx: &mut Context, r: i32, c: i32, board: &[Vec<u8>]) -> GameResult<Mesh> {
let start_x: f32 = 20.0;
let start_y: f32 = 20.0;
let size: f32 = 20.0; //compile time constants for now
let size: f32 = 4.0; //compile time constants for now
let mut builder = MeshBuilder::new();
@ -82,7 +82,7 @@ impl EventHandler for Apr {
fn update(&mut self, _ctx: &mut Context) -> GameResult<()> {
// Err(ggez::GameError::CustomError("You done messed up trying to play this game!".to_string()))
// Update code here...
for x in 0..self.row*self.col/5 {
for _x in 0..self.row*self.col {
let c = self.__TEST_state % self.col as usize;
let r = (self.__TEST_state / self.row as usize) % self.row as usize;
self.set_colour(r, c, (self.board[r][c] + 1) % 8)?;
@ -114,7 +114,7 @@ fn main() {
// Create an instance of your event handler.
// Usually, you should provide it with the Context object to
// use when setting your game up.
let apr = Apr::new(&mut ctx, 16, 16);
let apr = Apr::new(&mut ctx, 128, 128);
// Run!
event::run(ctx, event_loop, apr);

Loading…
Cancel
Save