split game struct
This commit is contained in:
parent
3468fff882
commit
e07fac4211
5 changed files with 218 additions and 188 deletions
13
src/main.rs
13
src/main.rs
|
|
@ -3,23 +3,14 @@ use servicepoint::{
|
|||
BinaryOperation, BitVecCommand, Bitmap, CharGrid, CharGridCommand, ClearCommand,
|
||||
CompressionCode, FRAME_PACING, TILE_HEIGHT, TILE_WIDTH, UdpSocketExt,
|
||||
};
|
||||
use std::{
|
||||
net::UdpSocket,
|
||||
thread::sleep,
|
||||
time::{Duration, Instant},
|
||||
};
|
||||
use std::{net::UdpSocket, thread::sleep, time::Instant};
|
||||
|
||||
mod bar;
|
||||
mod game;
|
||||
mod upgrades;
|
||||
mod unlocks;
|
||||
|
||||
type Currency = f64;
|
||||
|
||||
trait Progressable: Sized {
|
||||
#[must_use]
|
||||
fn progress(&self, delta: Duration) -> (Self, Currency);
|
||||
}
|
||||
|
||||
const DESTINATION: &str = "127.0.0.1:2342";
|
||||
//const DESTINATION: &str = "172.23.42.29:2342";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue