Code Monkey home page Code Monkey logo

v2048's Introduction

v2048

This is a simple 2048 game, written in the V programming language. 2048 Game Screenshot

Notes

This game is tested to work with V 0.1.29 b2fee21, but probably can be compiled with a more recent V compiler too.

Update (2022/08/10): it works with V 0.3.0 c752e5e.

Note: a much improved version of this game is available in the main V repository. See 2048.v . It has an AI (autosolver) mode, multiple cleaner looks of the tiles. It can also run on Android and on the web , unlike this one.

v2048's People

Contributors

spytheman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

spaceface777

v2048's Issues

v2048.vercel.app โ€” no demo

visible:

V 2048 demo
Authors: @spaceface777, @spytheman and other V contributors
Original game by @gabrielecirulli
Click on the canvas to go into fullscreen mode

That's all.
The canvas is indistinguishable, yet clicking under the text, fullscreen black color occurs without anything.

as seen in firefox 78.11.0esr (64-bit)

No longer compiles

Noticed that it currently doesn't compile. Tested on Windows. Seems to be due to syntax changes.

V version: V 0.1.29 a2fba05

Errors:

.\main.v:339:19: warning: use e.g. `x := [1]Type{}` instead of `x := [1]Type`
  337 |
  338 | fn (mut app App) new_random_tile() {
  339 |     mut etiles := [16]Pos
      |                      ^
  340 |     mut empty_tiles_max := 0
  341 |     for y := 0; y < 4; y++ {
.\main.v:370:18: error: unexpected `fn`, expecting `=`
  368 | }
  369 |
  370 | type BoardMoveFN fn(b Board) Board
      |                  ~~
  371 | fn (mut app App) move(move_fn BoardMoveFN) {
  372 |     old := app.board

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.