Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alanfortlink/blackjack.nvim
Classic Black Jack game in Neovim
https://github.com/alanfortlink/blackjack.nvim
Last synced: 2 months ago
JSON representation
Classic Black Jack game in Neovim
- Host: GitHub
- URL: https://github.com/alanfortlink/blackjack.nvim
- Owner: alanfortlink
- License: mit
- Created: 2023-02-24T21:25:55.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-23T07:40:58.000Z (9 months ago)
- Last Synced: 2024-01-24T10:50:20.563Z (5 months ago)
- Language: Lua
- Size: 31.3 KB
- Stars: 49
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-neovim - alanfortlink/blackjack.nvim - Classic Black Jack game. (Game / Tmux)
- awesome-neovim - alanfortlink/blackjack.nvim - Classic Black Jack game. (Game / Tmux)
- awesome-neovim - alanfortlink/blackjack.nvim - Classic Black Jack game. (Game / Tmux)
README
# 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
- [Neovim](https://github.com/neovim/neovim) >= 0.5.0
## Installation
### Using [Packer](https://github.com/wbthomason/packer.nvim)
```lua
use {
'alanfortlink/blackjack.nvim',
requires = {'nvim-lua/plenary.nvim'},
}
```### Using [vim-plug](https://github.com/junegunn/vim-plug)
```lua
Plug 'nvim-lua/plenary.nvim'
Plug 'alanfortlink/blackjack.nvim'
```### Setup (Optional)
```lua
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:
```vim
:BlackJackNewGame
```To quit the game you can press `q` or:
```vim
:BlackJackQuit
```To reset the scores:
```vim
:BlackJackResetScores
```Press `j` and `k` to play the game and `q` to quit.