Skip to content

Commit

Permalink
Launch space invaders on space (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
LilithHafner committed Apr 16, 2024
1 parent 955bdac commit 1821e3a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ version = "0.1.2"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
SpaceInvaders = "27459e48-f83e-40a1-9b04-5e43823e0701"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
LinearAlgebra = "<0.0.1, 1"
REPL = "<0.0.1, 1"
SpaceInvaders = "1"
Statistics = "<0.0.1, 1"
julia = "1"

Expand Down
13 changes: 13 additions & 0 deletions src/
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using SpaceInvaders, REPL

install(repl) = repl.interface.modes[1].keymap_dict[' '] = (s, args...) -> begin
if isempty(s) || position(REPL.LineEdit.buffer(s)) == 0
SpaceInvaders.main()
print(repl.t.out_stream, "\e[E")
REPL.LineEdit.write_prompt(repl.t, repl.interface.modes[1], repl.hascolor)
else
REPL.LineEdit.edit_insert(s, ' ')
end
nothing
end
__init__() = isdefined(Base, :active_repl) ? install(Base.active_repl) : Base.atreplinit(install)
1 change: 1 addition & 0 deletions src/WatchJuliaBurn.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ end
πŸ˜ƒπŸ“–[:(raw)] = (:(πŸ₯©),)
emoji_to_func[:(πŸ₯©"")] = (:(raw""), "")

include(" ")
include("πŸ˜ƒβ†’πŸ—Ώ.jl")
include("πŸ™ˆπŸ™ŠπŸ™‰.jl")

Expand Down

0 comments on commit 1821e3a

Please sign in to comment.