}
view.init(model);
+
gameManager.getPlayer(0).view = view.p0;
gameManager.getPlayer(1).view = view.p1;
player.execute();
}
+ // SDK @#%^&! arbitrary sequence point: last input < first output
+
for (Player player : gameManager.getActivePlayers()) {
Model.Player p = player.model;
}
else if (stones > 0) {
player.view.animateStones(stones);
+ player.view.updateStoneCounter();
}
}
catch (InvalidAction e) {
int y = 220;
Sprite border1 = graphicEntityModule.createSprite()
- // .setX(x)
- // .setY(y)
.setImage("frame.png")
.setAnchor(0.5)
.setScale(p0 ? -1 : 1)
.setTint(colorToken);
Sprite border2 = graphicEntityModule.createSprite()
- // .setX(x)
- // .setY(y)
.setImage("frame_bg.png")
.setAnchor(0.5)
.setZIndex(20);
Sprite avatarSprite = graphicEntityModule.createSprite()
- // .setX(x)
- // .setY(y)
.setZIndex(21)
.setImage(avatarToken)
.setAnchor(0.5)
.setFillColor(0x7f3f00)
.setAnchor(0.5);
- stoneCounter = graphicEntityModule.createText("S")
+ stoneCounter = graphicEntityModule.createText()
.setX(x)
.setY(y+200)
.setZIndex(20)
.setFontSize(40)
.setFillColor(0x7f3f00)
.setAnchor(0.5);
+ updateStoneCounter();
message = graphicEntityModule.createText()
.setX(p0 ? 15 : 1920-15)
.setAlpha(0);
}
- void setStone() {
+ void updateStoneCounter() {
int stones = model.getStones();
if (stones <= 0) {
stoneCounter.setText("Out of stones!");
.setX(1980/2)
.setY(980)
.setFillColor(0xffffff);
+
+ moveTroll();
}
void moveTroll() {