You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
534 B

//
// File.swift
//
//
// Created by Adam BONAFOS on 14/01/2025.
//
import Foundation
public struct TicTacToeRules: Rules {
func add(board: inout Board, position pos: (row: Int, column: Int), token: Token) -> Bool {
if board[pos.0, pos.1] == .empty {
board[pos.0, pos.1] = token
return true
}
return false
}
func isGameOver(board: Board) -> (result: Bool, winner: Token) {
// Need to be complete
// TODO
return (false, Token.empty)
}
}