//bat dau game public void beginDrawing() { Thread t = null; if (type == TypePlay.TUDO) { string[] map = getNextMap(); Map m = new Map(map[1]); User user = new User(); SingleMapActivity da = new SingleMapActivity(user, m, this, map[0]); pushStack(da); topOfStack.workFirst(); t = new Thread(drawTD); } else { createMapSourceCD(); string[] map = getNextMap(); popMap(); Map m = new Map(map[1]); User user = new User(); MultiMapActivity da = new MultiMapActivity(user, m, this, map[0]); pushStack(da); topOfStack.workFirst(); t = new Thread(drawCD); } isRun = true; t.Start(); }
public override void getKey(char c) { switch (c) { case Game.ZERO_KEY: cpu.popStack(); MultiMapActivity mma = new MultiMapActivity(user, map, cpu, label); cpu.pushStack(mma); cpu.topOfStackWork(); break; case Game.REFRESH_KEY: cpu.showAllInfo(); drawAll(); break; } }