Commit b2e31880 authored by Tobias Bengfort's avatar Tobias Bengfort
Browse files

Gardening (Tabs!)

parent 4c4090c7
......@@ -67,11 +67,11 @@ on('mousedown', '.board-cell', function(state, event) {
) return;
if (state.game.board[y][x] === currentPlayer) {
state.game.board[y][x] = constants.EMPTY;
if (state.game.tileLimit != null) {
state.game.tileLimit ++;
if (state.game.tileLimit !== undefined) {
state.game.tileLimit += 1;
}
} else if (state.game.board[y][x] === constants.EMPTY) {
if (state.game.tileLimit) {
if (state.game.tileLimit !== undefined) {
if (state.game.tileLimit < 1) return;
state.game.tileLimit -= 1;
}
......@@ -145,9 +145,9 @@ on('click', '.js-menu-scenario', function(state) {
board: clone(scenarios[i].board),
description: scenarios[i].description,
winCondition: scenarios[i].winCondition,
tileLimit: scenarios[i].tileLimit,
limitBuildSpaceA: scenarios[i].limitBuildSpaceA,
limitBuildSpaceB: scenarios[i].limitBuildSpaceB,
tileLimit: scenarios[i].tileLimit,
limitBuildSpaceA: scenarios[i].limitBuildSpaceA,
limitBuildSpaceB: scenarios[i].limitBuildSpaceB,
currentPlayer: 1,
playing: false,
steps: 0,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment