Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Canop/mazter
/ functions
Functions
115 in github.com/Canop/mazter
⨍
Functions
115
◇
Types & classes
23
↓ 21 callers
Method
set
( &mut self, p: Pos, value: T, )
src/pos_map.rs:30
↓ 16 callers
Method
get
( &self, p: Pos, )
src/pos_map.rs:24
↓ 15 callers
Method
is_room
( &self, p: Pos, )
src/maze.rs:101
↓ 10 callers
Method
contains
( &self, ach: Achievement, )
src/achievements.rs:120
↓ 10 callers
Function
twist
Return a pseudo-pseudo-random number, capped and reproductible (seed can be eg the level)
src/specs.rs:48
↓ 8 callers
Function
draw_bicolor_horizontal
Draw a cell with two colors, one for the left part, one for the right part
src/cell_draw.rs:26
↓ 8 callers
Function
draw_bicolor_vertical
Draw a cell with two colors, one for the top part, one for the bottom part
src/cell_draw.rs:44
↓ 8 callers
Method
is_alternate
(&self)
src/renderer.rs:32
↓ 8 callers
Method
is_empty
(&self)
src/events.rs:89
↓ 7 callers
Method
color
( &self, nature: Nature, )
src/skin.rs:26
↓ 7 callers
Method
visible_nature
While a cell can contain several "things", one of them is more visible and determines how it looks
src/maze.rs:112
↓ 5 callers
Method
is_wall
( &self, p: Pos, )
src/maze.rs:95
↓ 5 callers
Method
spaces
( &self, w: &mut W, n: usize, )
src/renderer.rs:354
↓ 4 callers
Function
find_astar
Find a short path between start and goal using A*. The returned path contains the goal but not the start.
src/path.rs:9
↓ 4 callers
Method
is_won
(&self)
src/maze.rs:89
↓ 4 callers
Method
kill_player
remove a life and teleport the player
src/maze.rs:597
↓ 4 callers
Method
real_color
( &self, nature: Nature, )
src/skin.rs:39
↓ 3 callers
Method
center
(&self)
src/maze.rs:134
↓ 3 callers
Method
clear
(&mut self)
src/events.rs:92
↓ 3 callers
Method
end_player_turn
move the world
src/maze.rs:667
↓ 3 callers
Method
idx
( self, p: Pos, )
src/dim.rs:31
↓ 3 callers
Method
maze_to_screen_double_size
Assuming the layout is in double_sizes mode, return the leftest cell for tye maze position
src/layout.rs:44
↓ 3 callers
Method
write
Render the maze (with title and lives count) for the TUI, assuming a buffered writer in an alternate
src/renderer.rs:367
↓ 3 callers
Method
write
(&self)
src/achievements.rs:107
↓ 2 callers
Method
achievement
(&self)
src/achievements.rs:61
↓ 2 callers
Method
add
( &mut self, ach: Achievement, )
src/achievements.rs:101
↓ 2 callers
Method
add_monster_move
( &mut self, start: Pos, dir: Dir, mut dest_background_nature: Nature, )
src/events.rs:60
↓ 2 callers
Function
build
build a maze and print it on stdout
src/main.rs:81
↓ 2 callers
Method
dir_to
Assuming that other is in one of the 4 directions, return the direction (will return something bad if it's eg the same pos)
src/pos.rs:80
↓ 2 callers
Method
grow
( &mut self, max: usize, )
src/maze.rs:495
↓ 2 callers
Method
hash
get the hash according to FNV
src/achievements.rs:35
↓ 2 callers
Method
inside_neighbours
(not counting the border)
src/maze.rs:445
↓ 2 callers
Method
is_lost
(&self)
src/maze.rs:92
↓ 2 callers
Method
layout
( &self, maze: &Maze, )
src/renderer.rs:36
↓ 2 callers
Method
neighbours_8
neighbour cells, including diagonals
src/maze.rs:413
↓ 2 callers
Method
open
( &mut self, p: Pos, )
src/maze.rs:137
↓ 2 callers
Method
pos_in_dir
( &self, pos: Pos, dir: Dir, )
src/maze.rs:154
↓ 2 callers
Method
remove
( &mut self, p: Pos, )
src/pos_map.rs:40
↓ 2 callers
Method
try_move
Try moving the player in the given direction, adding both this move and the monster move to the provided moves vector.
src/maze.rs:192
↓ 1 callers
Method
add_cuts
( &mut self, n: usize, )
src/maze.rs:361
↓ 1 callers
Method
add_player_move
( &mut self, start: Pos, dir: Dir, dest_background_nature: Nature, )
src/events.rs:44
↓ 1 callers
Method
add_potions
( &mut self, n: usize, )
src/maze.rs:377
↓ 1 callers
Method
add_teleport
( &mut self, start: Pos, possible_jumps: Vec<Pos>, arrival: Pos, )
src/events.rs:32
↓ 1 callers
Method
animate_events
Animate moves. Return true when the animation occured, false if it didn't. When there was no animation, this function is instant and the animation ma
src/renderer.rs:216
↓ 1 callers
Method
can_place_exit
(&self)
src/maze.rs:233
↓ 1 callers
Method
change_unreachable_rooms_into_invisible_walls
Due to cuts added after growing, some rooms may be unreachable in case of interrupted growing. This function makes them invisble walls to ensure we ca
src/maze.rs:510
↓ 1 callers
Method
cmp
( &self, other: &ValuedPos, )
src/pos.rs:132
↓ 1 callers
Method
dim
( self, level: usize, )
src/specs.rs:32
↓ 1 callers
Method
draw_pos_move_step_double_size
Draw one of the step (in [0..16] of the animation) of a moving pos when the maze is rendered in double size. The maze is supposed already rendered, o
src/renderer.rs:156
↓ 1 callers
Method
draw_teleport_double_size
( &self, w: &mut W, layout: &Layout, teleport: &Teleport, )
src/renderer.rs:135
↓ 1 callers
Method
draw_teleport_half_size
( &self, w: &mut W, layout: &Layout, maze: &Maze, teleport: &Teleport,
src/renderer.rs:85
↓ 1 callers
Method
empty_rooms
(&self)
src/maze.rs:319
↓ 1 callers
Method
enterable_neighbours
( &self, p: Pos, )
src/maze.rs:464
↓ 1 callers
Method
grow_invisible_walls
Make some walls invisible, for cosmetic reasons Warning: don't call this before the maze is fully grown and the exit has been set.
src/maze.rs:532
↓ 1 callers
Method
highlight_path_to_exit
( &mut self, from: Option<Pos>, )
src/maze.rs:582
↓ 1 callers
Method
in_dir
( self, dir: Dir, )
src/pos.rs:94
↓ 1 callers
Method
is_not_empty
tells whether there are not default values Warning: this function is slow (it could be optimized with a counter but there's no need today in mazter)
src/pos_map.rs:61
↓ 1 callers
Method
is_valid
(&self)
src/achievements.rs:64
↓ 1 callers
Method
len_to_player
( &self, p: Pos, )
src/maze.rs:299
↓ 1 callers
Method
maze_to_screen
return the canonical cell position from a maze position. If the layout is double_sizes, this is the leftest one of the two cells which make the posit
src/layout.rs:20
↓ 1 callers
Function
play
play the game, runing level after level, in an alternate terminal
src/main.rs:63
↓ 1 callers
Method
player
(&self)
src/maze.rs:86
↓ 1 callers
Method
player_moved
( &mut self, events: &mut EventList, )
src/maze.rs:624
↓ 1 callers
Method
possible_cuts
(&self)
src/maze.rs:335
↓ 1 callers
Method
possible_exits
border walls which, when open, make an exit
src/maze.rs:253
↓ 1 callers
Method
possible_jumps
( &self, p: Pos, )
src/maze.rs:273
↓ 1 callers
Function
print
display the hall of fame
src/hof.rs:15
↓ 1 callers
Function
run
Run the game, assuming the terminal is already in alternate mode
src/run.rs:24
↓ 1 callers
Method
seek_open
(&mut self)
src/maze.rs:210
↓ 1 callers
Method
set_start
( &mut self, player: Pos, )
src/maze.rs:69
↓ 1 callers
Method
start
(&self)
src/maze.rs:66
↓ 1 callers
Method
status
(&self)
src/maze.rs:77
↓ 1 callers
Method
step_dir_to
Return one of the 4 directions if the two positions are just one step away
src/pos.rs:54
↓ 1 callers
Method
try_make_exit
(&mut self)
src/maze.rs:307
↓ 1 callers
Method
verticalize
(&mut self)
src/dim.rs:37
↓ 1 callers
Method
write_game_header
( &self, w: &mut W, layout: &Layout, maze: &Maze, )
src/renderer.rs:43
↓ 1 callers
Method
write_game_status
( &self, w: &mut W, layout: &Layout, maze: &Maze, )
src/renderer.rs:69
↓ 1 callers
Method
write_maze_double_size
the rendering when the maze is very small and we can afford using 2 characters side by side for each game pos
src/renderer.rs:270
↓ 1 callers
Method
write_maze_half_size
( &self, w: &mut W, layout: &Layout, maze: &Maze, )
src/renderer.rs:305
Method
advance
save the achievement and return the first following level not won
src/achievements.rs:137
Method
build
()
src/skin.rs:15
Method
can_play
( user: &str, target: usize, )
src/achievements.rs:159
Method
clear
(&mut self)
src/pos_map.rs:37
Method
clear_highlight
(&mut self)
src/maze.rs:568
Method
compute
( maze_dim: Dim, player_pos: Option<Pos>, display: Display, )
src/layout.rs:52
Method
dim
( a: Pos, b: Pos, )
src/pos.rs:19
Method
eq
( &self, other: &ValuedPos, )
src/pos.rs:123
Method
euclidian_distance
( a: Pos, b: Pos, )
src/pos.rs:34
Method
first_not_won
(user: &str)
src/achievements.rs:149
Method
for_level
(level: usize)
src/specs.rs:59
Method
for_terminal_build
()
src/specs.rs:174
Method
from
( pos: Pos, score: i32, )
src/pos.rs:114
Method
from
(specs: Specs)
src/maze.rs:719
Method
from
(ach: Achievement<'s>)
src/achievements.rs:52
Method
give_up
(&mut self)
src/maze.rs:107
Method
highlight_start
(&mut self)
src/maze.rs:577
Method
hof
()
src/achievements.rs:209
Method
is_empty
Warning: this function is slow
src/pos_map.rs:53
Function
main
()
src/main.rs:104
Method
manhattan_distance
( a: Pos, b: Pos, )
src/pos.rs:40
next →
1–100 of 115, ranked by callers