Commit c4df1844 authored by Anders H. Rebner's avatar Anders H. Rebner
Browse files

Removed two TODO-comments

parent 505197db
......@@ -8,7 +8,7 @@ class Game(gameState: GameState, playerIds: LinkedHashSet<Int>) {
private var gameState: GameState
private var playerIds: LinkedHashSet<Int>
private var playerTurnId: Int
private var playerTurnIndex: Int = 0 // TODO: Random from server
private var playerTurnIndex: Int = 0
private var playerTurnSlot: Int
private var playerFinishedIds: List<Int> = listOf()
private var playerLeftIds: List<Int> = listOf()
......@@ -41,9 +41,9 @@ class Game(gameState: GameState, playerIds: LinkedHashSet<Int>) {
}
fun movePiece(fromCoordinates: Vector3, toCoordinates: Vector3, playerId: Int, gameController: GameController): Boolean {
// Check if players turn
// Check if players turn and if move is legal
if (playerId == playerTurnId && isLegalMove(fromCoordinates,toCoordinates)) {
// TODO: Check if valid move
val pieceMoved: Boolean = this.gameState.getBoardState().movePiece(fromCoordinates, toCoordinates)
if (pieceMoved) {
......
Markdown is supported
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