Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions bevy_replicon_example_backend/examples/simple_box.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
//! A simple demo to showcase how player could send inputs to move a box and server replicates position back.
//! Also demonstrates the single-player and how sever also could be a player.

use std::{
hash::{DefaultHasher, Hash, Hasher},
io,
};
use std::hash::{DefaultHasher, Hash, Hasher};

use bevy::{
color::palettes::css::GREEN,
Expand Down Expand Up @@ -48,7 +45,7 @@ impl Plugin for SimpleBoxPlugin {
}
}

fn read_cli(mut commands: Commands, cli: Res<Cli>) -> io::Result<()> {
fn read_cli(mut commands: Commands, cli: Res<Cli>) -> Result<()> {
match *cli {
Cli::SinglePlayer => {
info!("starting single-player game");
Expand Down
7 changes: 2 additions & 5 deletions bevy_replicon_example_backend/examples/tic_tac_toe.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
//! A game to showcase single-player and multiplier game.
//! Run it with `cargo run --example tic_tac_toe -- hotseat` to play locally or with `-- client` / `-- server`

use std::{
fmt::{self, Formatter},
io,
};
use std::fmt::{self, Formatter};

use bevy::{platform::collections::HashMap, prelude::*};
use bevy_replicon::prelude::*;
Expand Down Expand Up @@ -93,7 +90,7 @@ const LINE_THICKNESS: f32 = 10.0;
const BUTTON_SIZE: f32 = CELL_SIZE / 1.2;
const BUTTON_MARGIN: f32 = (CELL_SIZE + LINE_THICKNESS - BUTTON_SIZE) / 2.0;

fn read_cli(mut commands: Commands, cli: Res<Cli>) -> io::Result<()> {
fn read_cli(mut commands: Commands, cli: Res<Cli>) -> Result<()> {
match *cli {
Cli::Hotseat => {
info!("starting hotseat");
Expand Down
Loading