Implementation of the
2048
game for Neovim.
2048_showcase.mp4
lazy:
{
"NStefan002/2048.nvim",
cmd = "Play2048",
config = true,
}
use({
"NStefan002/2048.nvim",
config = function()
require("2048").setup()
end,
})
:Rocks install 2048.nvim
:Play2048
- Use the
h
,j
,k
,l
to move the squares in the desired direction. - Squares with the same number will merge when they collide, doubling their value.
- The goal is to create a tile with the number 2048.
- Continue playing and try to achieve the highest score possible.
- The game will automatically save your progress, so you can continue to play it whenever you want
h
- move the squares to the leftj
- move the squares downk
- move the squares upl
- move the squares to the rightu
- undo the last mover
- restart the gamen
- new game (select the board size)<CR>
- confirm in menus<Esc>
- cancel in menus
NOTE:
You can change the default mappings.
require("2048").setup({
keys = {
up = "<Up>",
down = "<Down>",
left = "<Left>",
right = "<Right>",
undo = "<C-z>",
restart = "R",
new_game = "N",
confirm = "y",
cancel = "n",
},
})