Lucky 2048 uses a normal distribution to create "lucky" start. Generally speaking, it provides lucky chances "most likely to be medium result, and very small probability to get very good results". Toll edition: μ = 7.0, σ = 1.0, probab…
ZOJ Monthly, August 2014 E题 ZOJ月赛 2014年8月 E题 http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5334 Easy 2048 Again Time Limit: 2 Seconds Memory Limit: 65536 KB Dark_sun knows that on a single-track road (which means once he passed this…
虽然说2048是好久前比较火的小游戏,但直到最近才有机会去研究下2048实现的源码,这里就简单写一下我(bie)的(ren)思路: 首先2048需要有十六个卡片,这个卡片可以用FrameLayout的子类来实现(继承),里面可以用TextView来实现设置背景颜色,显示的数字等.这样我们就可以简单实现这个卡片啦: public class Card extends FrameLayout { private int num = 0; private TextView label; public…