Git Product home page Git Product logo

15puzzle.nvim's Introduction

15 Puzzle

Implementation of the classic 15 Puzzle game for Neovim.

๐Ÿ“บ Showcase

15puzzle_showcase.mp4

๐Ÿ–ผ๏ธ Gallery

Preview themes

15P_theme1

15P_theme2

15P_theme3

15P_theme4

15P_theme5

๐Ÿ—ž๏ธ News

  • [26/03/2024] A puzzle solver is now available. Press s (or the key you mapped to solve) and the solver will try to find the best possible solution to the current puzzle state. If the solver does not find the solution in the given time (see solver_time_limit option) it will exit and let you continue the game. However, if it finds the solution quickly enough, it will start the animation that shows you the best moves to the solution.

๐Ÿ“‹ Installation

lazy:

{
    "NStefan002/15puzzle.nvim",
    cmd = "Play15puzzle",
    config = true,
}

packer:

use({
    "NStefan002/15puzzle.nvim",
    config = function()
        require("15puzzle").setup()
    end,
})

rocks.nvim

:Rocks install 15puzzle.nvim

โ“ How to Play

  1. :Play15puzzle
  2. Use the h, j, k, l to slide the squares in the desired direction.
  3. Place each square in its correct place.
  4. Try to solve the puzzle in the fewest moves and as fast as possible.

๐ŸŽฎ Controls

  • h - move the squares to the left
  • j - move the squares down
  • k - move the squares up
  • l - move the squares to the right
  • n - new game
  • s - activate the puzzle solver
  • <c-l> - next theme
  • <c-h> - previous theme
  • <CR> - confirm in menus
  • <Esc> - cancel in menus

NOTE:

You can change the default mappings and some additional settings.
require("15puzzle").setup({
    keys = {
        up = "k",
        down = "j",
        left = "h",
        right = "l",
        new_game = "n",
        confirm = "<CR>",
        cancel = "<Esc>",
        next_theme = "<c-l>",
        prev_theme = "<c-h>",
        solve = "s",
    },
    -- additional settings

    solver_time_limit = 7000,
})

15puzzle.nvim's People

Contributors

nstefan002 avatar github-actions[bot] avatar

Stargazers

StellarCoder avatar  avatar Bassam Data avatar Besufikad Micheal avatar Yuta Katayama avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.