1 viewer
rust 1,961,941 · typescript 233,850 · javascript 141,145 · python 22,871 · 6,801 files · digest 6d882eacc8db · built in 12.5 s · crystals off
cre8-util-grid-games crates cargo crate
Two-player games on a grid as rules a runtime can trust: one Rules trait, one position shape and move notation, nineteen games (shatranj, makruk, xiangqi and two small chesses, checkers, Breakthrough, tafl, Amazons, Go, Othello, Ataxx, Hex, Gomoku, Connect Four, tic-tac-toe), and a deterministic solver. Standard library only.
0workspace deps
1direct dependents
9transitive dependents
0calls out
41calls in
270call-graph weight
0.0%exact crystals
Neighbourhood
Left: crates that declare this one. Right: crates it declares (dev-dependencies included). Edge width grows with resolved calls.
Files
lowhigh
File call graph
Resolved calls between this crate's files, callers left of callees.
Heaviest functions
By call-graph weight (PageRank; 1.0 is the average function). 265 functions in all.
| function | kind | lines | cyclomatic | callers | callees | weight | crystal |
|---|---|---|---|---|---|---|---|
| applysrc/rules.rs:286 | fn | 18 | 4 | 30 | 2 | 10.4 | |
| advancesrc/rules.rs:247 | fn | 7 | 3 | 10 | 0 | 8.9 | |
| notationsrc/rules.rs:256 | fn | 24 | 8 | 11 | 2 | 6.8 | |
| Board::cellssrc/board.rs:47 | method | 3 | 1 | 30 | 1 | 6.3 | |
| Board::lensrc/board.rs:39 | method | 3 | 1 | 2 | 0 | 6.3 | |
| decodesrc/rules.rs:429 | fn | 58 | 13 | 29 | 3 | 6 | |
| Board::ranksrc/board.rs:63 | method | 3 | 1 | 24 | 0 | 5.7 | |
| Piece::newsrc/state.rs:19 | method | 3 | 1 | 22 | 0 | 5.6 | |
| lettersrc/rules.rs:281 | fn | 3 | 1 | 2 | 0 | 4.9 | |
| replaysrc/rules.rs:365 | fn | 9 | 2 | 18 | 1 | 4.8 | |
| State::emptysrc/state.rs:80 | method | 10 | 1 | 11 | 0 | 4.7 | |
| Board::filesrc/board.rs:59 | method | 3 | 1 | 17 | 0 | 4.6 | |
| State::is_empty_atsrc/state.rs:99 | method | 3 | 1 | 16 | 0 | 4.2 | |
| Board::adjacencysrc/board.rs:73 | method | 6 | 2 | 9 | 0 | 4.1 | |
| perftsrc/rules.rs:377 | fn | 10 | 3 | 9 | 2 | 4.1 | |
| findsrc/games/mod.rs:46 | fn | 4 | 1 | 13 | 0 | 3.6 | |
| Board::namesrc/board.rs:81 | method | 4 | 1 | 2 | 2 | 3.5 | |
| legal_movessrc/rules.rs:233 | fn | 3 | 2 | 8 | 0 | 3.2 | |
| Outcome::winnersrc/state.rs:33 | method | 6 | 2 | 7 | 0 | 2.9 | |
| position_keysrc/state.rs:136 | fn | 24 | 3 | 2 | 0 | 2.7 | |
| State::keysrc/state.rs:113 | method | 3 | 1 | 3 | 1 | 2.6 | |
| catalogsrc/games/mod.rs:41 | fn | 3 | 1 | 13 | 0 | 2.5 | |
| Chesslike::boardsrc/games/chesslike.rs:327 | method | 3 | 1 | 8 | 0 | 2.2 | |
| Go::areasrc/games/go.rs:118 | method | 34 | 11 | 3 | 3 | 2.2 | |
| neutral_kindsrc/rules.rs:489 | fn | 3 | 1 | 1 | 0 | 2.2 | |
| Rng::next_u64src/solver.rs:25 | method | 8 | 1 | 1 | 0 | 2 | |
| Playout::next_stampsrc/games/go.rs:410 | method | 4 | 1 | 2 | 0 | 2 | |
| Move::placesrc/state.rs:182 | method | 3 | 1 | 9 | 0 | 1.9 | |
| piece_charsrc/rules.rs:419 | fn | 7 | 3 | 1 | 1 | 1.8 | |
| Rng::belowsrc/solver.rs:35 | method | 3 | 1 | 5 | 1 | 1.8 | |
| State::ownssrc/state.rs:104 | method | 3 | 1 | 9 | 0 | 1.8 | |
| Chesslike::in_checksrc/games/chesslike.rs:470 | method | 25 | 7 | 2 | 6 | 1.7 | |
| State::successorsrc/state.rs:126 | method | 7 | 1 | 10 | 1 | 1.6 | |
| encodesrc/rules.rs:391 | fn | 27 | 6 | 6 | 1 | 1.6 | |
| Move::passsrc/state.rs:190 | method | 3 | 1 | 6 | 0 | 1.5 | |
| Board::squaresrc/board.rs:31 | method | 3 | 1 | 3 | 0 | 1.4 | |
| Chesslike::checkedsrc/games/chesslike.rs:509 | method | 3 | 1 | 3 | 1 | 1.3 | |
| parse_movesrc/rules.rs:307 | fn | 38 | 13 | 4 | 3 | 1.3 | |
| Tafl::cornersrc/games/tafl.rs:100 | method | 6 | 4 | 3 | 2 | 1.3 | |
| mctssrc/solver.rs:269 | fn | 116 | 21 | 3 | 8 | 1.3 |