battlesnake_game_types/compact_representation/core/cell_board/
you_determinable.rs

1use crate::{
2    compact_representation::{core::dimensions::Dimensions, CellNum},
3    types::{SnakeId, YouDeterminableGame},
4};
5
6use super::CellBoard;
7
8impl<T: CellNum, D: Dimensions, const BOARD_SIZE: usize, const MAX_SNAKES: usize>
9    YouDeterminableGame for CellBoard<T, D, BOARD_SIZE, MAX_SNAKES>
10{
11    fn is_you(&self, snake_id: &Self::SnakeIDType) -> bool {
12        snake_id.0 == 0
13    }
14
15    fn you_id(&self) -> &Self::SnakeIDType {
16        &SnakeId(0)
17    }
18}