From 7050fd1b8f1449b5a66261fd1fdd82e0179f3ed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chauntalle=20Schu=CC=88le?= Date: Wed, 3 Jun 2020 13:19:56 +0200 Subject: [PATCH] last changes --- GoldWars/GoldWars/RoundCalculatorService.swift | 2 -- GoldWars/GoldWars/States/GameState.swift | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/GoldWars/GoldWars/RoundCalculatorService.swift b/GoldWars/GoldWars/RoundCalculatorService.swift index 1954403..8e33fab 100644 --- a/GoldWars/GoldWars/RoundCalculatorService.swift +++ b/GoldWars/GoldWars/RoundCalculatorService.swift @@ -26,13 +26,11 @@ class RoundCalculatorService { var numberOfAttacks = 0 var numberOfOwnUnitMoves = 0 - var roundNr = 1 func calculateRound() { StateManager.sharedInstance.stateMachine?.enter(SyncingState.self) os_log("Started calculating Round", log: RoundCalculatorService.LOG, type: .info) - roundNr += 1 isCalculating = true let currentSnapshotModel = DataService.sharedInstance.snapshotModel var baseSpecificMoves = collectBaseSpecificMoves() diff --git a/GoldWars/GoldWars/States/GameState.swift b/GoldWars/GoldWars/States/GameState.swift index ab768a7..6ab6db8 100644 --- a/GoldWars/GoldWars/States/GameState.swift +++ b/GoldWars/GoldWars/States/GameState.swift @@ -29,7 +29,7 @@ class GameState: GKState { os_log("Entered Game State", log: LOG, type: .info) if CommandLine.arguments.contains("--no-matchmaking") { StateManager.sharedInstance.menuSc!.loadScene(scene: GameScene(size: StateManager.sharedInstance.menuSc!.size)) - } else if RoundCalculatorService.sharedInstance.roundNr == 1 { + } else if RoundCalculatorService.sharedInstance.currentRound == 1 { StateManager.sharedInstance.menuSc!.loadScene(scene: StateManager.sharedInstance.gameSc!) } }