Commit Graph

43 Commits

Author SHA1 Message Date
tali 588d673ad0 panic if queue is too big 2023-04-16 15:35:53 -04:00
tali df1913d8f3 impl Display for Queue, impl Debug for Node 2023-04-15 17:29:10 -04:00
tali 60cde45eea use casts instead of transmute in mino::Mat::new() 2023-04-14 20:27:44 -04:00
tali ac487eec38 make Queue::new() a const fn 2023-04-14 17:33:38 -04:00
tali e8351e73be make Queue::reachable() iterator much more lean 2023-04-12 15:49:53 -04:00
tali a0aaba461d derive Copy for Queue 2023-04-11 19:11:43 -04:00
tali 3fb3743cd1 add pretty simple Queue type to mino 2023-04-11 16:22:18 -04:00
tali 89f64aa8d8 fix impl IndexMut<RangeFull> for MatBuf to only provide up to ..rows 2023-04-11 12:31:35 -04:00
tali 586d328718 add MatBuf::shift_up() operation 2023-04-11 12:31:35 -04:00
tali d564bc25af shrimplify: MatBuf is only generic of its length, not buffer type 2023-04-09 14:35:56 -04:00
tali c2e91dc30a Piece derives Copy 2023-03-07 19:10:16 -05:00
tali 3e52b6fb71 Fix clippy lints
- format strings
2023-03-05 12:45:04 -05:00
tali b6e6a00164 Add IndexMut impls for MatBuf 2022-12-21 20:56:38 -05:00
tali 13f5d0c2eb fixup! fix Mat impl Index<Range> 2022-12-21 20:56:36 -05:00
tali d30f413949 Index operator overloads for Mat 2022-12-20 11:09:42 -05:00
tali 4240c91a34 Add MatBuf::fill_row(), Piece::fill() 2022-12-18 19:18:19 -05:00
tali 21f6b25de0 Create MatBuf abstraction for mutable matrix types 2022-12-18 18:57:10 -05:00
tali aee42c7ddf impl Debug for Mat 2022-12-16 10:22:27 -05:00
tali 1eee852191 Add conversions between srs::PieceType and char,str 2022-12-16 10:22:18 -05:00
tali 0d52d6b1b5 Rename a lot of stuff related to piece types
- srs::Shape => srs::PieceType

- Piece.shape => Piece.ty

- Piece<S> => Piece<T>
2022-12-15 14:53:06 -05:00
tali 41df73bafc Export Movement and some useful Movement aliases 2022-12-14 15:55:27 -05:00
tali af682d88ff Custom Loc debug formatter 2022-12-14 15:55:27 -05:00
tali 8291a07ee4 Derive Hash for many data types 2022-12-14 15:55:27 -05:00
tali 096189373c impl From<(x,y,r)> for Loc 2022-12-14 15:55:27 -05:00
tali b3d9e3c476 Add test that cells() can be equal for different rotation states 2022-12-14 15:55:27 -05:00
tali 1dcf36ef6f impl Debug for Cells 2022-12-14 15:55:27 -05:00
tali 583b6b64f8 Code gen SRS spawn location constant 2022-12-14 15:03:37 -05:00
tali aefa1deb6a Add Piece::spawn() function, Spawn trait 2022-12-14 13:36:13 -05:00
tali 614c183234 Add input::Movement enum 2022-12-14 13:34:46 -05:00
tali 4b9d10699f Implement SRS kicks code gen 2022-12-14 13:34:46 -05:00
tali 6726326ec8 Add input::rotate(), Kicks trait 2022-12-14 13:34:46 -05:00
tali c5f7d9d622 Add input::drop(), shift() operations 2022-12-14 13:34:46 -05:00
tali eebbde71b9 Make Cells::translate a pure function 2022-12-14 13:34:46 -05:00
tali 1075546dd8 Add back Spin type in new submodule 'input' 2022-12-14 13:34:46 -05:00
tali 2dc972c756 Move Loc, Rot types to inside piece.rs 2022-12-14 12:59:45 -05:00
tali c5ca155ad2 Add SRS shape implementations via build time code-gen 2022-12-14 12:59:45 -05:00
tali f33a60d24d Make extern crate alloc centralized 2022-12-14 12:58:43 -05:00
tali 2c4afe54a0 Add Shape trait, Piece, Cells types 2022-12-14 12:58:43 -05:00
tali fa6aac86f6 Rename types in location.rs 2022-12-14 09:59:05 -05:00
tali 0597b3b538 Add Location, Orientation, Rotation types 2022-12-13 14:20:21 -05:00
tali 91ee995c71 Add ascii matrix macro 2022-12-13 14:20:21 -05:00
tali 908fa77d8a Add matrix datastructure 2022-12-13 14:19:32 -05:00
tali 58956c1983 Initialize `mino` crate 2022-12-13 14:15:39 -05:00