move MAX_HEALTH into main
This commit is contained in:
parent
39e84b3783
commit
7eb6eff65a
@ -14,9 +14,7 @@ use log::info;
|
|||||||
use rand::seq::SliceRandom;
|
use rand::seq::SliceRandom;
|
||||||
use serde_json::{json, Value};
|
use serde_json::{json, Value};
|
||||||
|
|
||||||
use crate::{Action, Battlesnake, Board, Direction, Game};
|
use crate::{Action, Battlesnake, Board, Direction, Game, MAX_HEALTH};
|
||||||
|
|
||||||
const MAX_HEALTH: i32 = 100;
|
|
||||||
|
|
||||||
impl Battlesnake {
|
impl Battlesnake {
|
||||||
fn possible_actions_without_heads<'a>(
|
fn possible_actions_without_heads<'a>(
|
||||||
|
@ -12,6 +12,8 @@ use std::env;
|
|||||||
|
|
||||||
mod logic;
|
mod logic;
|
||||||
|
|
||||||
|
const MAX_HEALTH: i32 = 100;
|
||||||
|
|
||||||
// API and Response Objects
|
// API and Response Objects
|
||||||
// See https://docs.battlesnake.com/api
|
// See https://docs.battlesnake.com/api
|
||||||
|
|
||||||
@ -159,7 +161,7 @@ pub struct Battlesnake {
|
|||||||
// customizations: {color, head, tail}
|
// customizations: {color, head, tail}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Eq, Clone, Copy, Deserialize, Serialize)]
|
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Deserialize, Serialize)]
|
||||||
pub struct Coord {
|
pub struct Coord {
|
||||||
x: i32,
|
x: i32,
|
||||||
y: i32,
|
y: i32,
|
||||||
|
Loading…
Reference in New Issue
Block a user