Skip to content
This repository was archived by the owner on Sep 15, 2020. It is now read-only.

Commit 3782481

Browse files
authored
release: 20.3.1
This PR will correct multiple misbehaviours introduced with last patch (#115) - fix: correct outdated import - fix(gameRule): correct incorrect possibleMoves for beetles when on stack - fix(dialog): correct missing dialog-window for replay save and load - release: 20.3.1
1 parent 73aa843 commit 3782481

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "software-challenge-gui",
33
"productName": "Software-Challenge-GUI",
4-
"version": "20.3.0",
4+
"version": "20.3.1",
55
"description": "GUI für die Software-Challenge",
66
"main": "main.js",
77
"scripts": {

src/api/rules/Hive.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as deepEqual from 'deep-equal'
1+
import deepEqual from 'deep-equal'
22
import { GameRuleLogic } from './HiveGameRules'
33
import { Undeployed } from '../../viewer/Engine/HiveEngine'
44

src/api/rules/HiveGameRules.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ export class GameRuleLogic {
233233

234234
// Beetle darf drauf
235235
if (board.getTopPiece(from).kind == 'BEETLE') {
236-
if (!this.getFieldsWithPiece(board).some(e => e.coordinates.equal(to)) && !this.isFieldNextToSwarm(board, to, from)) {
236+
if (!this.getFieldsWithPiece(board).some(e => e.coordinates.equal(to)) && (board.getField(from).stack.length == 1 && !this.isFieldNextToSwarm(board, to, from) || board.getField(from).stack.length > 1 && !this.isFieldNextToSwarm(board, to, null))) {
237237
console.log('Das Ziel des Beetles ist weder auf einem anderen Insekt, noch neben dem Schwarm')
238238
return false
239239
}

src/gui/App.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export class App extends React.Component<any, State> {
8989

9090
private loadReplay() {
9191
dialog.showOpenDialog(
92-
remote.require('browser-window'),
92+
null,
9393
{
9494
title: 'Wähle ein Replay',
9595
properties: ['openFile'],

src/gui/Game.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export class Game extends React.Component<{ gameId: number, name: string, isRepl
220220
saveReplay() {
221221
if (!this.props.isReplay) {
222222
dialog.showSaveDialog(
223-
remote.require('browser-window'),
223+
null,
224224
{
225225
title: 'Wähle einen Ort zum Speichern des Replays',
226226
defaultPath: this.props.name + '.xml',

0 commit comments

Comments
 (0)