diff --git a/fish/src/find.rs b/fish/src/find.rs index a939b35..95ea9d0 100644 --- a/fish/src/find.rs +++ b/fish/src/find.rs @@ -4,16 +4,9 @@ use alloc::vec::Vec; use hashbrown::hash_set::HashSet; use mino::input::Kicks; use mino::piece::{Shape, Spawn}; +use mino::srs::PieceType; use mino::{input, Loc, Mat, Movement, Piece}; -// Generic arguments legend -// ======================== -// - T: piece type (e.g. srs::PieceType) -// - 'm: matrix lifetime -// - 'c: T::cells() lifetime -// - 'k: T::kicks() lifetime -// - 'a: general purpose lifetime - static ALL_INPUTS: &[Movement] = &[ Movement::LEFT, Movement::RIGHT, @@ -23,10 +16,7 @@ static ALL_INPUTS: &[Movement] = &[ ]; /// Yields all of the locations reachable by the given peice on the given matrix. -pub fn find_locations<'a, 'c, 'k, T>(matrix: &'a Mat, piece_ty: T) -> FindLocations -where - T: Shape<'c> + Kicks<'k> + Spawn + Clone + 'a, -{ +pub fn find_locations(matrix: &Mat, piece_ty: PieceType) -> FindLocations<'_, PieceType> { FindLocations::new(matrix, piece_ty) }