Code Monkey home page Code Monkey logo

vudoku's Introduction

Vudoku

A simple sudoku game written in V lang

Introduction

The origin of the name is quite obvious "v" + "sudoku" = "vudoku". This is the project I created to try out v lang again after several months so if you have a thing for spaghetti, feel free to dig into my code ๐Ÿ˜„.

How to build

This is a standard v lang project so building should be quite straightforward.

  1. Install vlang
  2. Clone this repo
  3. Run v build .

How to play

If you don't know sudoku, please read about it here.

Start the game

When starting the game, you can specify the difficulty by passing an argument to the game. There are 4 levels of difficulty:

  1. Easy
  2. Medium
  3. Hard
  4. Expert

So let's say you just started out and want to try the expert level. You would start the game with this command:

./vudoku expert

Note: By default, if you don't specify anything, the game will use easy level

Restart / New game

If you wins the game or you just want to restart to a new game, press r.

Enter number

To fill a cell with your number, press the number key that you want. You can't use 0 because...there's no 0 in sudoku.

Navigation

You can use the arrow keys to navigate in the game or if you are a vim user hjkl ftw!

Otherwise, you can also use mouse to click on the cell you want to edit.

Clear the cell

Oh no, you somehow messed up and want to clear the value of a cell that you have filled. No worries, just press c to clear the current cell that you are on.

Pause / Resume the game

If you wife come at you and say "we need to talk" or there's an earthquake at your place and you want to pause the game, just hit p to pause or resume the game and I hope that you survive the situation.

TLDR

Key Function
Arrow keys / h j k l / Mouse left click Navigate between cells
Number keys Fill number into cell
p Pause / Resume game
r Restart / New game
c Clear the current cell

Screenshots

Author

Vudoku is a project by:

License

Contribute & Support

All pull requests are welcome!

If you wish to support the author, you can buy him a coffee...though he would prefer tea instead, but coffee is fine.

ko-fi

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.