Giter Site home page Giter Site logo

2048's Introduction

#2048 by TDFJ

用Ruby写的在终端里跑的2048,上下左右键操作,q退出,操作后按回车确定

如果按下没反应,请自行修改方向键的判断字符串

实现了2048游戏的大部分功能,还有两个地方没有解决:

  1. 成功玩到2048,没有相应的提示。其实我已经写好了判断胜利的方法,但是我目前还没有玩到过,就懒得调用这个方法了

  2. 游戏失败的判断方法没有完成。我现在只写了一个判断有没有空格的语句,实际的2048游戏在格子被填满后,还要判断是否有相邻的相同的数字,如果有就不算失败,略麻烦懒得写了


update @ 2014.07.10: 修正数字没有变动时仍然会出现新数字的情况

update @ 2014.07.23: 稍微修改了代码,并使用colored给不同的数字添上了不同色的背景

2048's People

Contributors

mrhuxu avatar

Watchers

James Cloos avatar  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.