Separate ansi code to its file

This commit is contained in:
Rampoina 2023-03-05 03:10:27 +01:00
parent 9245c619a9
commit 06646746c6
2 changed files with 8 additions and 7 deletions

7
ansi.bqn Normal file
View File

@ -0,0 +1,7 @@
ansi{
e@+27
rede"[31m"
cyane"[36m"
yellowe"[33m"
defaultBe"[0m"
}

View File

@ -5,6 +5,7 @@
# Arc
# The level is a 2d matrix of lists (tiles)
# Each list contains the objects of the game represented as ints
ansi•Import "ansi.bqn"
moves00 # list of moves, each move is a direction, we start without moving
chars" λ$⊕⭍#/\-|+<>^v" # legal characters
@ -15,13 +16,6 @@ lasers←llaser‿rlaser‿ulaser‿dlaser
movablesplayerboxmirrors # player, box and mirrors
opaqueplayerboxmachinewalllasers # non laser reflecting
emptiesfloorbeams # floor and laser beams
ansi{
e@+27
rede"[31m"
cyane"[36m"
yellowe"[33m"
defaultBe"[0m"
}
colors(chars)<ansi.defaultB # start with all glyphs being the default color
colors ansi.yellow˙(pmachine)