alanfortlink/blackjack.nvim

github github
game
stars 52
issues 1
subscribers 2
forks 2
CREATED

2023-02-24

UPDATED

7 months ago


Blackjack.nvim

Blackjack.nvim is a neovim plugin that implements a classic BlackJack game in neovim.

Using the "mini" style of cards:

https://user-images.githubusercontent.com/3660978/221558874-d2ac9f49-f076-47f7-8521-de9e45f042cb.mov

Using the "large" style of cards:

https://user-images.githubusercontent.com/3660978/221390688-2c53d1e3-74b5-4f00-8f30-30a9388621d1.mov


Requirements

Installation

Using Packer

use {
  'alanfortlink/blackjack.nvim',
  requires = {'nvim-lua/plenary.nvim'},
}

Using vim-plug

Plug 'nvim-lua/plenary.nvim'
Plug 'alanfortlink/blackjack.nvim'

Setup (Optional)

require("blackjack").setup({
  card_style = "mini", -- Can be "mini" or "large".
  suit_style = "black", -- Can be "black" or "white".
  scores_path = "/home/foo/blackjack_scores.json", -- Default location to store the scores.json file.
  keybindings = {
    ["next"] = "j",
    ["finish"] = "k",
    ["quit"] = "q",
  },
})

Usage

To start a new game:

:BlackJackNewGame

To quit the game you can press q or:

:BlackJackQuit

To reset the scores:

:BlackJackResetScores

Press j and k to play the game and q to quit.