Seed random number generation
This commit is contained in:
parent
89e43686ca
commit
5560013e33
11
run-local.sh
11
run-local.sh
@ -1,4 +1,11 @@
|
||||
./build-web.sh && \
|
||||
cargo build --target wasm32-unknown-unknown --release
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Wasm build failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p ./local-deploy && \
|
||||
./deploy-ltpd.sh ./local-deploy && \
|
||||
cp ./web/index.html ./local-deploy/index.html && \
|
||||
cp ./target/wasm32-unknown-unknown/release/sol_chess.wasm ./local-deploy/sol_chess.wasm && \
|
||||
basic-http-server ./local-deploy
|
||||
|
@ -3,6 +3,7 @@ use std::fmt::{Display, Formatter};
|
||||
|
||||
use game::texture::PieceTexture;
|
||||
use macroquad::prelude::*;
|
||||
use miniquad::date;
|
||||
use sol_chess::{
|
||||
board::{Board, BoardState},
|
||||
generator,
|
||||
@ -12,6 +13,7 @@ mod game;
|
||||
|
||||
#[macroquad::main("Solitaire Chess")]
|
||||
async fn main() {
|
||||
rand::srand(date::now() as u64);
|
||||
let background_color = Color::from_rgba(196, 195, 208, 255);
|
||||
let mut game = init().await;
|
||||
loop {
|
||||
|
Loading…
x
Reference in New Issue
Block a user