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.

22 lines
451 B

//
// File.swift
//
//
// Created by Adam BONAFOS on 14/01/2025.
//
import Foundation
public struct TicTacToeRules: Rules {
func add(board: inout Board, position pos: (Int, Int), playerId: PlayerId) -> Bool {
if board[pos.0, pos.1] == .empty {
board[pos.0, pos.1] = playerId
return true
}
return false
}
func isGameOver(board: Board) -> (Bool, PlayerId) {
<#code#>
}
}