Skip to content

Commit

Permalink
Call GameBoard.displayOutcome
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenbensley committed Sep 7, 2024
1 parent f47f74e commit 85d3a48
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Queah/GameScene.swift
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,9 @@ final class GameScene: SKScene {
}

func displayOutcome() {
let text = game.isOver ? "\(game.toMove.other) wins!" : "Draw by repetition."
let alert = AutoAlert(text)
addChild(alert)
alert.display(forDuration: 5.0, completion: { })
}
let text = game.isOver ? "\(game.toMove.other) Wins!" : "Draw by Repetition"
board.displayOutcome(text: text)
}

func displayHint() {
let viewMove = convertMove(game.bestMove)
Expand Down

0 comments on commit 85d3a48

Please sign in to comment.