🔀 merging to get NavigationStack

dev_ARKit
Nathan VERDIER 10 months ago
commit 1b693e584c

@ -1,65 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AvailableLibraries</key>
<array>
<dict>
<key>BinaryPath</key>
<string>DouShouQiModel.framework/DouShouQiModel</string>
<key>DebugSymbolsPath</key>
<string>dSYMs</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>DouShouQiModel.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>DouShouQiModel.framework/DouShouQiModel</string>
<key>DebugSymbolsPath</key>
<string>dSYMs</string>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>DouShouQiModel.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>DouShouQiModel.framework/Versions/A/DouShouQiModel</string>
<key>DebugSymbolsPath</key>
<string>dSYMs</string>
<key>LibraryIdentifier</key>
<string>macos-arm64_x86_64</string>
<key>LibraryPath</key>
<string>DouShouQiModel.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>macos</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
<key>XCFrameworkFormatVersion</key>
<string>1.0</string>
</dict>
</plist>

@ -1,311 +0,0 @@
#if 0
#elif defined(__arm64__) && __arm64__
// Generated by Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
#ifndef DOUSHOUQIMODEL_SWIFT_H
#define DOUSHOUQIMODEL_SWIFT_H
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
#if !defined(__has_include)
# define __has_include(x) 0
#endif
#if !defined(__has_attribute)
# define __has_attribute(x) 0
#endif
#if !defined(__has_feature)
# define __has_feature(x) 0
#endif
#if !defined(__has_warning)
# define __has_warning(x) 0
#endif
#if __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#if defined(__OBJC__)
#include <Foundation/Foundation.h>
#endif
#if defined(__cplusplus)
#include <cstdint>
#include <cstddef>
#include <cstdbool>
#include <cstring>
#include <stdlib.h>
#include <new>
#include <type_traits>
#else
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <string.h>
#endif
#if defined(__cplusplus)
#if defined(__arm64e__) && __has_include(<ptrauth.h>)
# include <ptrauth.h>
#else
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreserved-macro-identifier"
# ifndef __ptrauth_swift_value_witness_function_pointer
# define __ptrauth_swift_value_witness_function_pointer(x)
# endif
# ifndef __ptrauth_swift_class_method_pointer
# define __ptrauth_swift_class_method_pointer(x)
# endif
#pragma clang diagnostic pop
#endif
#endif
#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if __has_include(<uchar.h>)
# include <uchar.h>
# elif !defined(__cplusplus)
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#endif
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
# define SWIFT_CLASS_PROPERTY(...)
# endif
#endif
#if !defined(SWIFT_RUNTIME_NAME)
# if __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
# else
# define SWIFT_RUNTIME_NAME(X)
# endif
#endif
#if !defined(SWIFT_COMPILE_NAME)
# if __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
# else
# define SWIFT_COMPILE_NAME(X)
# endif
#endif
#if !defined(SWIFT_METHOD_FAMILY)
# if __has_attribute(objc_method_family)
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
# else
# define SWIFT_METHOD_FAMILY(X)
# endif
#endif
#if !defined(SWIFT_NOESCAPE)
# if __has_attribute(noescape)
# define SWIFT_NOESCAPE __attribute__((noescape))
# else
# define SWIFT_NOESCAPE
# endif
#endif
#if !defined(SWIFT_RELEASES_ARGUMENT)
# if __has_attribute(ns_consumed)
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
# else
# define SWIFT_RELEASES_ARGUMENT
# endif
#endif
#if !defined(SWIFT_WARN_UNUSED_RESULT)
# if __has_attribute(warn_unused_result)
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
# else
# define SWIFT_WARN_UNUSED_RESULT
# endif
#endif
#if !defined(SWIFT_NORETURN)
# if __has_attribute(noreturn)
# define SWIFT_NORETURN __attribute__((noreturn))
# else
# define SWIFT_NORETURN
# endif
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM_ATTR)
# if __has_attribute(enum_extensibility)
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
# else
# define SWIFT_ENUM_ATTR(_extensibility)
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# if __has_feature(generalized_swift_name)
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# else
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if !defined(SWIFT_DEPRECATED_OBJC)
# if __has_feature(attribute_diagnose_if_objc)
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
# else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
# endif
#endif
#if defined(__OBJC__)
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#endif
#if !defined(SWIFT_EXTERN)
# if defined(__cplusplus)
# define SWIFT_EXTERN extern "C"
# else
# define SWIFT_EXTERN extern
# endif
#endif
#if !defined(SWIFT_CALL)
# define SWIFT_CALL __attribute__((swiftcall))
#endif
#if !defined(SWIFT_INDIRECT_RESULT)
# define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result))
#endif
#if !defined(SWIFT_CONTEXT)
# define SWIFT_CONTEXT __attribute__((swift_context))
#endif
#if !defined(SWIFT_ERROR_RESULT)
# define SWIFT_ERROR_RESULT __attribute__((swift_error_result))
#endif
#if defined(__cplusplus)
# define SWIFT_NOEXCEPT noexcept
#else
# define SWIFT_NOEXCEPT
#endif
#if !defined(SWIFT_C_INLINE_THUNK)
# if __has_attribute(always_inline)
# if __has_attribute(nodebug)
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug))
# else
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline))
# endif
# else
# define SWIFT_C_INLINE_THUNK inline
# endif
#endif
#if defined(_WIN32)
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport)
#endif
#else
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
# define SWIFT_IMPORT_STDLIB_SYMBOL
#endif
#endif
#if defined(__OBJC__)
#if __has_feature(objc_modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
#endif
#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
# undef any
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="DouShouQiModel",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
#if defined(__OBJC__)
#endif
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#if defined(__cplusplus)
#endif
#pragma clang diagnostic pop
#endif
#else
#error unsupported Swift architecture
#endif

@ -1,18 +0,0 @@
//
// DouShouQiModel.h
// DouShouQiModel
//
// Created by Marc Chevaldonné on 14/05/2024.
//
#import <Foundation/Foundation.h>
//! Project version number for DouShouQiModel.
FOUNDATION_EXPORT double DouShouQiModelVersionNumber;
//! Project version string for DouShouQiModel.
FOUNDATION_EXPORT const unsigned char DouShouQiModelVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <DouShouQiModel/PublicHeader.h>

@ -1,266 +0,0 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
// swift-module-flags: -target arm64-apple-ios16.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name DouShouQiModel
// swift-module-flags-ignorable: -enable-bare-slash-regex
@_exported import DouShouQiModel
import Foundation
import Swift
import _Concurrency
import _StringProcessing
import _SwiftConcurrencyShims
public enum Result : Swift.Equatable {
case notFinished
case even
case winner(winner: DouShouQiModel.Owner, reason: DouShouQiModel.WinningReason)
public static func == (a: DouShouQiModel.Result, b: DouShouQiModel.Result) -> Swift.Bool
}
public enum WinningReason {
case denReached, noMorePieces, tooManyOccurences, noMovesLeft
public static func == (a: DouShouQiModel.WinningReason, b: DouShouQiModel.WinningReason) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public enum BoardResult : Swift.Equatable {
case unknown
case ok(piece: DouShouQiModel.Piece?)
case failed(reason: DouShouQiModel.BoardFailingReason)
public static func == (a: DouShouQiModel.BoardResult, b: DouShouQiModel.BoardResult) -> Swift.Bool
}
public enum BoardFailingReason {
case unknown, outOfBounds, cellNotEmpty, cellEmpty
public static func == (a: DouShouQiModel.BoardFailingReason, b: DouShouQiModel.BoardFailingReason) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers public class HumanPlayer : DouShouQiModel.Player {
public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner, andInputMethod input: @escaping (_ hp: DouShouQiModel.HumanPlayer) -> DouShouQiModel.Move?)
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
#if compiler(>=5.3) && $AsyncAwait
override public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
public func changeInput(input: @escaping (_ hp: DouShouQiModel.HumanPlayer) -> DouShouQiModel.Move?)
#if compiler(>=5.3) && $AsyncAwait
public func chooseMove(_ move: DouShouQiModel.Move?) async throws
#endif
@objc deinit
}
public struct ClassicRules : DouShouQiModel.Rules {
public static func createBoard() -> DouShouQiModel.Board
public static func checkBoard(_ board: DouShouQiModel.Board) throws
public init()
public init(occurences: [DouShouQiModel.Board : Swift.Int], historic: [DouShouQiModel.Move])
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
public func isMoveValid(onBoard board: DouShouQiModel.Board, fromRow originRow: Swift.Int, andFromColumn originColumn: Swift.Int, toRow destinationRow: Swift.Int, andToColumn destinationColumn: Swift.Int) -> Swift.Bool
public func isMoveValid(onBoard board: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
public func isGameOver(withBoard board: DouShouQiModel.Board, andLastRowPlayed lastRow: Swift.Int, andLastColumnPlayer lastColumn: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
public mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
public func getNextPlayer() -> DouShouQiModel.Owner
public var occurences: [DouShouQiModel.Board : Swift.Int] {
get
}
public var historic: [DouShouQiModel.Move] {
get
}
}
public struct Cell : Swift.CustomStringConvertible, Swift.Equatable {
public var description: Swift.String {
get
}
public let cellType: DouShouQiModel.CellType
public let initialOwner: DouShouQiModel.Owner
public var piece: DouShouQiModel.Piece?
public init(ofType cellType: DouShouQiModel.CellType, ownedBy initialOwner: DouShouQiModel.Owner = .noOne, withPiece piece: DouShouQiModel.Piece? = nil)
public static func == (a: DouShouQiModel.Cell, b: DouShouQiModel.Cell) -> Swift.Bool
}
public struct VerySimpleRules : DouShouQiModel.Rules {
public static func createBoard() -> DouShouQiModel.Board
public static func checkBoard(_ board: DouShouQiModel.Board) throws
public init()
public init(occurences: [DouShouQiModel.Board : Swift.Int], historic: [DouShouQiModel.Move])
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
public func isMoveValid(onBoard board: DouShouQiModel.Board, fromRow originRow: Swift.Int, andFromColumn originColumn: Swift.Int, toRow destinationRow: Swift.Int, andToColumn destinationColumn: Swift.Int) -> Swift.Bool
public func isMoveValid(onBoard board: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
public func isGameOver(withBoard board: DouShouQiModel.Board, andLastRowPlayed lastRow: Swift.Int, andLastColumnPlayer lastColumn: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
public mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
public func getNextPlayer() -> DouShouQiModel.Owner
public var occurences: [DouShouQiModel.Board : Swift.Int] {
get
}
public var historic: [DouShouQiModel.Move] {
get
}
}
public protocol Rules {
static func createBoard() -> DouShouQiModel.Board
static func checkBoard(_ board: DouShouQiModel.Board) throws
func getNextPlayer() -> DouShouQiModel.Owner
func getMoves(in board: DouShouQiModel.Board, of: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
func getMoves(in board: DouShouQiModel.Board, of: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
func isMoveValid(onBoard: DouShouQiModel.Board, fromRow: Swift.Int, andFromColumn: Swift.Int, toRow: Swift.Int, andToColumn: Swift.Int) -> Swift.Bool
func isMoveValid(onBoard: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
func isGameOver(withBoard: DouShouQiModel.Board, andLastRowPlayed: Swift.Int, andLastColumnPlayer: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
var occurences: [DouShouQiModel.Board : Swift.Int] { get }
var historic: [DouShouQiModel.Move] { get }
}
public class Player {
final public let name: Swift.String
final public let id: DouShouQiModel.Owner
public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
#if compiler(>=5.3) && $AsyncAwait
public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
#if compiler(>=5.3) && $AsyncAwait
public func addPlayedCallbacksListener(_ listener: @escaping (DouShouQiModel.Move?, DouShouQiModel.Player) async throws -> Swift.Void)
#endif
#if compiler(>=5.3) && $AsyncAwait
public func notifyPlayed(withMove move: DouShouQiModel.Move?, andPlayer player: DouShouQiModel.Player) async throws
#endif
@objc deinit
}
public enum GameError : Swift.Error {
case invalidMove, nextPlayerError, badPlayerId(message: Swift.String), invalidRules, invalidPlayer, invalidGame, invalidBoard
}
@_inheritsConvenienceInitializers public class RandomPlayer : DouShouQiModel.IAPlayer {
#if compiler(>=5.3) && $AsyncAwait
override public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
@objc deinit
}
public enum CellType : Swift.CaseIterable {
case unknown, jungle, water, trap, den
public static func == (a: DouShouQiModel.CellType, b: DouShouQiModel.CellType) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public typealias AllCases = [DouShouQiModel.CellType]
public static var allCases: [DouShouQiModel.CellType] {
get
}
public var hashValue: Swift.Int {
get
}
}
public struct Board : Swift.Hashable {
public func hash(into hasher: inout Swift.Hasher)
public let nbRows: Swift.Int
public let nbColumns: Swift.Int
public var grid: [[DouShouQiModel.Cell]] {
get
}
public init?(withGrid grid: [[DouShouQiModel.Cell]])
public func countPieces(of owner: DouShouQiModel.Owner) -> Swift.Int
public func countPieces() -> (nbOfPiecesOfPlayer1: Swift.Int, nbOfPiecesOfPlayer2: Swift.Int)
public mutating func insert(piece: DouShouQiModel.Piece, atRow row: Swift.Int, andColumn column: Swift.Int) -> DouShouQiModel.BoardResult
public mutating func removePiece(atRow row: Swift.Int, andColumn column: Swift.Int) -> DouShouQiModel.BoardResult
public static func == (a: DouShouQiModel.Board, b: DouShouQiModel.Board) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
}
public struct Piece : Swift.CustomStringConvertible, Swift.Hashable {
public var description: Swift.String {
get
}
public let owner: DouShouQiModel.Owner
public let animal: DouShouQiModel.Animal
public init(withOwner owner: DouShouQiModel.Owner, andAnimal animal: DouShouQiModel.Animal)
public func hash(into hasher: inout Swift.Hasher)
public static func == (a: DouShouQiModel.Piece, b: DouShouQiModel.Piece) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
}
public enum InvalidBoardError : Swift.Error, Swift.Equatable {
case unknownError
case badDimensions(nbRows: Swift.Int, nbColumns: Swift.Int)
case badCellType(cellType: DouShouQiModel.CellType, row: Swift.Int, column: Swift.Int)
case multipleOccurenceOfSamePiece(piece: DouShouQiModel.Piece)
case pieceWithNoOwner(piece: DouShouQiModel.Piece)
case pieceNotAllowedOnThisCell(piece: DouShouQiModel.Piece, cell: DouShouQiModel.Cell)
public static func == (a: DouShouQiModel.InvalidBoardError, b: DouShouQiModel.InvalidBoardError) -> Swift.Bool
}
public enum Owner {
case noOne, player1, player2
public var simpleDescription: Swift.String {
get
}
public static func == (a: DouShouQiModel.Owner, b: DouShouQiModel.Owner) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers public class IAPlayer : DouShouQiModel.Player {
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
@objc deinit
}
public struct Move : Swift.CustomStringConvertible, Swift.Equatable {
public let owner: DouShouQiModel.Owner
public let rowOrigin: Swift.Int
public let columnOrigin: Swift.Int
public let rowDestination: Swift.Int
public let columnDestination: Swift.Int
public init(of owner: DouShouQiModel.Owner, fromRow rowOrigin: Swift.Int, andFromColumn colOrigin: Swift.Int, toRow rowDest: Swift.Int, andToColumn colDest: Swift.Int)
public var description: Swift.String {
get
}
public static func == (a: DouShouQiModel.Move, b: DouShouQiModel.Move) -> Swift.Bool
}
public enum Animal : Swift.Int {
case rat, cat, dog, wolf, leopard, tiger, lion, elephant
public init?(rawValue: Swift.Int)
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
public class Game {
public var board: DouShouQiModel.Board {
get
}
public var rules: any DouShouQiModel.Rules {
get
}
final public let players: [DouShouQiModel.Owner : DouShouQiModel.Player]
public init(withRules rules: any DouShouQiModel.Rules, andPlayer1 player1: DouShouQiModel.Player, andPlayer2 player2: DouShouQiModel.Player) throws
public init(withBoard board: DouShouQiModel.Board, andRules rules: any DouShouQiModel.Rules, andPlayer1 player1: DouShouQiModel.Player, andPlayer2 player2: DouShouQiModel.Player) throws
public func addGameStartedListener(_ listener: @escaping (DouShouQiModel.Board) -> Swift.Void)
#if compiler(>=5.3) && $AsyncAwait
public func addPlayerNotifiedListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Player) async throws -> Swift.Void)
#endif
#if compiler(>=5.3) && $AsyncAwait
public func addGameChangedListener(_ listener: @escaping (DouShouQiModel.Game) async -> Swift.Void)
#endif
public func addGameOverListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Result, DouShouQiModel.Player?) -> Swift.Void)
public func addMoveChosenCallbacksListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Move, DouShouQiModel.Player) -> Swift.Void)
public func addInvalidMoveCallbacksListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Move, DouShouQiModel.Player, Swift.Bool) -> Swift.Void)
public func addBoardChangedListener(_ listener: @escaping (DouShouQiModel.Board) -> Swift.Void)
public func addPieceRemovedListener(_ listener: @escaping (Swift.Int, Swift.Int, DouShouQiModel.Piece) -> Swift.Void)
#if compiler(>=5.3) && $AsyncAwait
public func onPlayed(with move: DouShouQiModel.Move?, from player: DouShouQiModel.Player) async throws
#endif
public var isOver: Swift.Bool {
get
}
#if compiler(>=5.3) && $AsyncAwait
public func start() async throws
#endif
@objc deinit
}
extension DouShouQiModel.WinningReason : Swift.Equatable {}
extension DouShouQiModel.WinningReason : Swift.Hashable {}
extension DouShouQiModel.BoardFailingReason : Swift.Equatable {}
extension DouShouQiModel.BoardFailingReason : Swift.Hashable {}
extension DouShouQiModel.CellType : Swift.Equatable {}
extension DouShouQiModel.CellType : Swift.Hashable {}
extension DouShouQiModel.Owner : Swift.Equatable {}
extension DouShouQiModel.Owner : Swift.Hashable {}
extension DouShouQiModel.Animal : Swift.Equatable {}
extension DouShouQiModel.Animal : Swift.Hashable {}
extension DouShouQiModel.Animal : Swift.RawRepresentable {}

@ -1,266 +0,0 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
// swift-module-flags: -target arm64-apple-ios16.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name DouShouQiModel
// swift-module-flags-ignorable: -enable-bare-slash-regex
@_exported import DouShouQiModel
import Foundation
import Swift
import _Concurrency
import _StringProcessing
import _SwiftConcurrencyShims
public enum Result : Swift.Equatable {
case notFinished
case even
case winner(winner: DouShouQiModel.Owner, reason: DouShouQiModel.WinningReason)
public static func == (a: DouShouQiModel.Result, b: DouShouQiModel.Result) -> Swift.Bool
}
public enum WinningReason {
case denReached, noMorePieces, tooManyOccurences, noMovesLeft
public static func == (a: DouShouQiModel.WinningReason, b: DouShouQiModel.WinningReason) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public enum BoardResult : Swift.Equatable {
case unknown
case ok(piece: DouShouQiModel.Piece?)
case failed(reason: DouShouQiModel.BoardFailingReason)
public static func == (a: DouShouQiModel.BoardResult, b: DouShouQiModel.BoardResult) -> Swift.Bool
}
public enum BoardFailingReason {
case unknown, outOfBounds, cellNotEmpty, cellEmpty
public static func == (a: DouShouQiModel.BoardFailingReason, b: DouShouQiModel.BoardFailingReason) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers public class HumanPlayer : DouShouQiModel.Player {
public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner, andInputMethod input: @escaping (_ hp: DouShouQiModel.HumanPlayer) -> DouShouQiModel.Move?)
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
#if compiler(>=5.3) && $AsyncAwait
override public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
public func changeInput(input: @escaping (_ hp: DouShouQiModel.HumanPlayer) -> DouShouQiModel.Move?)
#if compiler(>=5.3) && $AsyncAwait
public func chooseMove(_ move: DouShouQiModel.Move?) async throws
#endif
@objc deinit
}
public struct ClassicRules : DouShouQiModel.Rules {
public static func createBoard() -> DouShouQiModel.Board
public static func checkBoard(_ board: DouShouQiModel.Board) throws
public init()
public init(occurences: [DouShouQiModel.Board : Swift.Int], historic: [DouShouQiModel.Move])
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
public func isMoveValid(onBoard board: DouShouQiModel.Board, fromRow originRow: Swift.Int, andFromColumn originColumn: Swift.Int, toRow destinationRow: Swift.Int, andToColumn destinationColumn: Swift.Int) -> Swift.Bool
public func isMoveValid(onBoard board: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
public func isGameOver(withBoard board: DouShouQiModel.Board, andLastRowPlayed lastRow: Swift.Int, andLastColumnPlayer lastColumn: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
public mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
public func getNextPlayer() -> DouShouQiModel.Owner
public var occurences: [DouShouQiModel.Board : Swift.Int] {
get
}
public var historic: [DouShouQiModel.Move] {
get
}
}
public struct Cell : Swift.CustomStringConvertible, Swift.Equatable {
public var description: Swift.String {
get
}
public let cellType: DouShouQiModel.CellType
public let initialOwner: DouShouQiModel.Owner
public var piece: DouShouQiModel.Piece?
public init(ofType cellType: DouShouQiModel.CellType, ownedBy initialOwner: DouShouQiModel.Owner = .noOne, withPiece piece: DouShouQiModel.Piece? = nil)
public static func == (a: DouShouQiModel.Cell, b: DouShouQiModel.Cell) -> Swift.Bool
}
public struct VerySimpleRules : DouShouQiModel.Rules {
public static func createBoard() -> DouShouQiModel.Board
public static func checkBoard(_ board: DouShouQiModel.Board) throws
public init()
public init(occurences: [DouShouQiModel.Board : Swift.Int], historic: [DouShouQiModel.Move])
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
public func isMoveValid(onBoard board: DouShouQiModel.Board, fromRow originRow: Swift.Int, andFromColumn originColumn: Swift.Int, toRow destinationRow: Swift.Int, andToColumn destinationColumn: Swift.Int) -> Swift.Bool
public func isMoveValid(onBoard board: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
public func isGameOver(withBoard board: DouShouQiModel.Board, andLastRowPlayed lastRow: Swift.Int, andLastColumnPlayer lastColumn: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
public mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
public func getNextPlayer() -> DouShouQiModel.Owner
public var occurences: [DouShouQiModel.Board : Swift.Int] {
get
}
public var historic: [DouShouQiModel.Move] {
get
}
}
public protocol Rules {
static func createBoard() -> DouShouQiModel.Board
static func checkBoard(_ board: DouShouQiModel.Board) throws
func getNextPlayer() -> DouShouQiModel.Owner
func getMoves(in board: DouShouQiModel.Board, of: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
func getMoves(in board: DouShouQiModel.Board, of: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
func isMoveValid(onBoard: DouShouQiModel.Board, fromRow: Swift.Int, andFromColumn: Swift.Int, toRow: Swift.Int, andToColumn: Swift.Int) -> Swift.Bool
func isMoveValid(onBoard: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
func isGameOver(withBoard: DouShouQiModel.Board, andLastRowPlayed: Swift.Int, andLastColumnPlayer: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
var occurences: [DouShouQiModel.Board : Swift.Int] { get }
var historic: [DouShouQiModel.Move] { get }
}
public class Player {
final public let name: Swift.String
final public let id: DouShouQiModel.Owner
public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
#if compiler(>=5.3) && $AsyncAwait
public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
#if compiler(>=5.3) && $AsyncAwait
public func addPlayedCallbacksListener(_ listener: @escaping (DouShouQiModel.Move?, DouShouQiModel.Player) async throws -> Swift.Void)
#endif
#if compiler(>=5.3) && $AsyncAwait
public func notifyPlayed(withMove move: DouShouQiModel.Move?, andPlayer player: DouShouQiModel.Player) async throws
#endif
@objc deinit
}
public enum GameError : Swift.Error {
case invalidMove, nextPlayerError, badPlayerId(message: Swift.String), invalidRules, invalidPlayer, invalidGame, invalidBoard
}
@_inheritsConvenienceInitializers public class RandomPlayer : DouShouQiModel.IAPlayer {
#if compiler(>=5.3) && $AsyncAwait
override public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
@objc deinit
}
public enum CellType : Swift.CaseIterable {
case unknown, jungle, water, trap, den
public static func == (a: DouShouQiModel.CellType, b: DouShouQiModel.CellType) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public typealias AllCases = [DouShouQiModel.CellType]
public static var allCases: [DouShouQiModel.CellType] {
get
}
public var hashValue: Swift.Int {
get
}
}
public struct Board : Swift.Hashable {
public func hash(into hasher: inout Swift.Hasher)
public let nbRows: Swift.Int
public let nbColumns: Swift.Int
public var grid: [[DouShouQiModel.Cell]] {
get
}
public init?(withGrid grid: [[DouShouQiModel.Cell]])
public func countPieces(of owner: DouShouQiModel.Owner) -> Swift.Int
public func countPieces() -> (nbOfPiecesOfPlayer1: Swift.Int, nbOfPiecesOfPlayer2: Swift.Int)
public mutating func insert(piece: DouShouQiModel.Piece, atRow row: Swift.Int, andColumn column: Swift.Int) -> DouShouQiModel.BoardResult
public mutating func removePiece(atRow row: Swift.Int, andColumn column: Swift.Int) -> DouShouQiModel.BoardResult
public static func == (a: DouShouQiModel.Board, b: DouShouQiModel.Board) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
}
public struct Piece : Swift.CustomStringConvertible, Swift.Hashable {
public var description: Swift.String {
get
}
public let owner: DouShouQiModel.Owner
public let animal: DouShouQiModel.Animal
public init(withOwner owner: DouShouQiModel.Owner, andAnimal animal: DouShouQiModel.Animal)
public func hash(into hasher: inout Swift.Hasher)
public static func == (a: DouShouQiModel.Piece, b: DouShouQiModel.Piece) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
}
public enum InvalidBoardError : Swift.Error, Swift.Equatable {
case unknownError
case badDimensions(nbRows: Swift.Int, nbColumns: Swift.Int)
case badCellType(cellType: DouShouQiModel.CellType, row: Swift.Int, column: Swift.Int)
case multipleOccurenceOfSamePiece(piece: DouShouQiModel.Piece)
case pieceWithNoOwner(piece: DouShouQiModel.Piece)
case pieceNotAllowedOnThisCell(piece: DouShouQiModel.Piece, cell: DouShouQiModel.Cell)
public static func == (a: DouShouQiModel.InvalidBoardError, b: DouShouQiModel.InvalidBoardError) -> Swift.Bool
}
public enum Owner {
case noOne, player1, player2
public var simpleDescription: Swift.String {
get
}
public static func == (a: DouShouQiModel.Owner, b: DouShouQiModel.Owner) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers public class IAPlayer : DouShouQiModel.Player {
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
@objc deinit
}
public struct Move : Swift.CustomStringConvertible, Swift.Equatable {
public let owner: DouShouQiModel.Owner
public let rowOrigin: Swift.Int
public let columnOrigin: Swift.Int
public let rowDestination: Swift.Int
public let columnDestination: Swift.Int
public init(of owner: DouShouQiModel.Owner, fromRow rowOrigin: Swift.Int, andFromColumn colOrigin: Swift.Int, toRow rowDest: Swift.Int, andToColumn colDest: Swift.Int)
public var description: Swift.String {
get
}
public static func == (a: DouShouQiModel.Move, b: DouShouQiModel.Move) -> Swift.Bool
}
public enum Animal : Swift.Int {
case rat, cat, dog, wolf, leopard, tiger, lion, elephant
public init?(rawValue: Swift.Int)
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
public class Game {
public var board: DouShouQiModel.Board {
get
}
public var rules: any DouShouQiModel.Rules {
get
}
final public let players: [DouShouQiModel.Owner : DouShouQiModel.Player]
public init(withRules rules: any DouShouQiModel.Rules, andPlayer1 player1: DouShouQiModel.Player, andPlayer2 player2: DouShouQiModel.Player) throws
public init(withBoard board: DouShouQiModel.Board, andRules rules: any DouShouQiModel.Rules, andPlayer1 player1: DouShouQiModel.Player, andPlayer2 player2: DouShouQiModel.Player) throws
public func addGameStartedListener(_ listener: @escaping (DouShouQiModel.Board) -> Swift.Void)
#if compiler(>=5.3) && $AsyncAwait
public func addPlayerNotifiedListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Player) async throws -> Swift.Void)
#endif
#if compiler(>=5.3) && $AsyncAwait
public func addGameChangedListener(_ listener: @escaping (DouShouQiModel.Game) async -> Swift.Void)
#endif
public func addGameOverListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Result, DouShouQiModel.Player?) -> Swift.Void)
public func addMoveChosenCallbacksListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Move, DouShouQiModel.Player) -> Swift.Void)
public func addInvalidMoveCallbacksListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Move, DouShouQiModel.Player, Swift.Bool) -> Swift.Void)
public func addBoardChangedListener(_ listener: @escaping (DouShouQiModel.Board) -> Swift.Void)
public func addPieceRemovedListener(_ listener: @escaping (Swift.Int, Swift.Int, DouShouQiModel.Piece) -> Swift.Void)
#if compiler(>=5.3) && $AsyncAwait
public func onPlayed(with move: DouShouQiModel.Move?, from player: DouShouQiModel.Player) async throws
#endif
public var isOver: Swift.Bool {
get
}
#if compiler(>=5.3) && $AsyncAwait
public func start() async throws
#endif
@objc deinit
}
extension DouShouQiModel.WinningReason : Swift.Equatable {}
extension DouShouQiModel.WinningReason : Swift.Hashable {}
extension DouShouQiModel.BoardFailingReason : Swift.Equatable {}
extension DouShouQiModel.BoardFailingReason : Swift.Hashable {}
extension DouShouQiModel.CellType : Swift.Equatable {}
extension DouShouQiModel.CellType : Swift.Hashable {}
extension DouShouQiModel.Owner : Swift.Equatable {}
extension DouShouQiModel.Owner : Swift.Hashable {}
extension DouShouQiModel.Animal : Swift.Equatable {}
extension DouShouQiModel.Animal : Swift.Hashable {}
extension DouShouQiModel.Animal : Swift.RawRepresentable {}

@ -1,11 +0,0 @@
framework module DouShouQiModel {
umbrella header "DouShouQiModel.h"
export *
module * { export * }
}
module DouShouQiModel.Swift {
header "DouShouQiModel-Swift.h"
requires objc
}

@ -1,618 +0,0 @@
#if 0
#elif defined(__arm64__) && __arm64__
// Generated by Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
#ifndef DOUSHOUQIMODEL_SWIFT_H
#define DOUSHOUQIMODEL_SWIFT_H
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
#if !defined(__has_include)
# define __has_include(x) 0
#endif
#if !defined(__has_attribute)
# define __has_attribute(x) 0
#endif
#if !defined(__has_feature)
# define __has_feature(x) 0
#endif
#if !defined(__has_warning)
# define __has_warning(x) 0
#endif
#if __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#if defined(__OBJC__)
#include <Foundation/Foundation.h>
#endif
#if defined(__cplusplus)
#include <cstdint>
#include <cstddef>
#include <cstdbool>
#include <cstring>
#include <stdlib.h>
#include <new>
#include <type_traits>
#else
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <string.h>
#endif
#if defined(__cplusplus)
#if defined(__arm64e__) && __has_include(<ptrauth.h>)
# include <ptrauth.h>
#else
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreserved-macro-identifier"
# ifndef __ptrauth_swift_value_witness_function_pointer
# define __ptrauth_swift_value_witness_function_pointer(x)
# endif
# ifndef __ptrauth_swift_class_method_pointer
# define __ptrauth_swift_class_method_pointer(x)
# endif
#pragma clang diagnostic pop
#endif
#endif
#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if __has_include(<uchar.h>)
# include <uchar.h>
# elif !defined(__cplusplus)
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#endif
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
# define SWIFT_CLASS_PROPERTY(...)
# endif
#endif
#if !defined(SWIFT_RUNTIME_NAME)
# if __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
# else
# define SWIFT_RUNTIME_NAME(X)
# endif
#endif
#if !defined(SWIFT_COMPILE_NAME)
# if __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
# else
# define SWIFT_COMPILE_NAME(X)
# endif
#endif
#if !defined(SWIFT_METHOD_FAMILY)
# if __has_attribute(objc_method_family)
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
# else
# define SWIFT_METHOD_FAMILY(X)
# endif
#endif
#if !defined(SWIFT_NOESCAPE)
# if __has_attribute(noescape)
# define SWIFT_NOESCAPE __attribute__((noescape))
# else
# define SWIFT_NOESCAPE
# endif
#endif
#if !defined(SWIFT_RELEASES_ARGUMENT)
# if __has_attribute(ns_consumed)
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
# else
# define SWIFT_RELEASES_ARGUMENT
# endif
#endif
#if !defined(SWIFT_WARN_UNUSED_RESULT)
# if __has_attribute(warn_unused_result)
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
# else
# define SWIFT_WARN_UNUSED_RESULT
# endif
#endif
#if !defined(SWIFT_NORETURN)
# if __has_attribute(noreturn)
# define SWIFT_NORETURN __attribute__((noreturn))
# else
# define SWIFT_NORETURN
# endif
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM_ATTR)
# if __has_attribute(enum_extensibility)
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
# else
# define SWIFT_ENUM_ATTR(_extensibility)
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# if __has_feature(generalized_swift_name)
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# else
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if !defined(SWIFT_DEPRECATED_OBJC)
# if __has_feature(attribute_diagnose_if_objc)
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
# else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
# endif
#endif
#if defined(__OBJC__)
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#endif
#if !defined(SWIFT_EXTERN)
# if defined(__cplusplus)
# define SWIFT_EXTERN extern "C"
# else
# define SWIFT_EXTERN extern
# endif
#endif
#if !defined(SWIFT_CALL)
# define SWIFT_CALL __attribute__((swiftcall))
#endif
#if !defined(SWIFT_INDIRECT_RESULT)
# define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result))
#endif
#if !defined(SWIFT_CONTEXT)
# define SWIFT_CONTEXT __attribute__((swift_context))
#endif
#if !defined(SWIFT_ERROR_RESULT)
# define SWIFT_ERROR_RESULT __attribute__((swift_error_result))
#endif
#if defined(__cplusplus)
# define SWIFT_NOEXCEPT noexcept
#else
# define SWIFT_NOEXCEPT
#endif
#if !defined(SWIFT_C_INLINE_THUNK)
# if __has_attribute(always_inline)
# if __has_attribute(nodebug)
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug))
# else
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline))
# endif
# else
# define SWIFT_C_INLINE_THUNK inline
# endif
#endif
#if defined(_WIN32)
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport)
#endif
#else
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
# define SWIFT_IMPORT_STDLIB_SYMBOL
#endif
#endif
#if defined(__OBJC__)
#if __has_feature(objc_modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
#endif
#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
# undef any
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="DouShouQiModel",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
#if defined(__OBJC__)
#endif
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#if defined(__cplusplus)
#endif
#pragma clang diagnostic pop
#endif
#elif defined(__x86_64__) && __x86_64__
// Generated by Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
#ifndef DOUSHOUQIMODEL_SWIFT_H
#define DOUSHOUQIMODEL_SWIFT_H
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
#if !defined(__has_include)
# define __has_include(x) 0
#endif
#if !defined(__has_attribute)
# define __has_attribute(x) 0
#endif
#if !defined(__has_feature)
# define __has_feature(x) 0
#endif
#if !defined(__has_warning)
# define __has_warning(x) 0
#endif
#if __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#if defined(__OBJC__)
#include <Foundation/Foundation.h>
#endif
#if defined(__cplusplus)
#include <cstdint>
#include <cstddef>
#include <cstdbool>
#include <cstring>
#include <stdlib.h>
#include <new>
#include <type_traits>
#else
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <string.h>
#endif
#if defined(__cplusplus)
#if defined(__arm64e__) && __has_include(<ptrauth.h>)
# include <ptrauth.h>
#else
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreserved-macro-identifier"
# ifndef __ptrauth_swift_value_witness_function_pointer
# define __ptrauth_swift_value_witness_function_pointer(x)
# endif
# ifndef __ptrauth_swift_class_method_pointer
# define __ptrauth_swift_class_method_pointer(x)
# endif
#pragma clang diagnostic pop
#endif
#endif
#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if __has_include(<uchar.h>)
# include <uchar.h>
# elif !defined(__cplusplus)
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#endif
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
# define SWIFT_CLASS_PROPERTY(...)
# endif
#endif
#if !defined(SWIFT_RUNTIME_NAME)
# if __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
# else
# define SWIFT_RUNTIME_NAME(X)
# endif
#endif
#if !defined(SWIFT_COMPILE_NAME)
# if __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
# else
# define SWIFT_COMPILE_NAME(X)
# endif
#endif
#if !defined(SWIFT_METHOD_FAMILY)
# if __has_attribute(objc_method_family)
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
# else
# define SWIFT_METHOD_FAMILY(X)
# endif
#endif
#if !defined(SWIFT_NOESCAPE)
# if __has_attribute(noescape)
# define SWIFT_NOESCAPE __attribute__((noescape))
# else
# define SWIFT_NOESCAPE
# endif
#endif
#if !defined(SWIFT_RELEASES_ARGUMENT)
# if __has_attribute(ns_consumed)
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
# else
# define SWIFT_RELEASES_ARGUMENT
# endif
#endif
#if !defined(SWIFT_WARN_UNUSED_RESULT)
# if __has_attribute(warn_unused_result)
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
# else
# define SWIFT_WARN_UNUSED_RESULT
# endif
#endif
#if !defined(SWIFT_NORETURN)
# if __has_attribute(noreturn)
# define SWIFT_NORETURN __attribute__((noreturn))
# else
# define SWIFT_NORETURN
# endif
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM_ATTR)
# if __has_attribute(enum_extensibility)
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
# else
# define SWIFT_ENUM_ATTR(_extensibility)
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# if __has_feature(generalized_swift_name)
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# else
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if !defined(SWIFT_DEPRECATED_OBJC)
# if __has_feature(attribute_diagnose_if_objc)
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
# else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
# endif
#endif
#if defined(__OBJC__)
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#endif
#if !defined(SWIFT_EXTERN)
# if defined(__cplusplus)
# define SWIFT_EXTERN extern "C"
# else
# define SWIFT_EXTERN extern
# endif
#endif
#if !defined(SWIFT_CALL)
# define SWIFT_CALL __attribute__((swiftcall))
#endif
#if !defined(SWIFT_INDIRECT_RESULT)
# define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result))
#endif
#if !defined(SWIFT_CONTEXT)
# define SWIFT_CONTEXT __attribute__((swift_context))
#endif
#if !defined(SWIFT_ERROR_RESULT)
# define SWIFT_ERROR_RESULT __attribute__((swift_error_result))
#endif
#if defined(__cplusplus)
# define SWIFT_NOEXCEPT noexcept
#else
# define SWIFT_NOEXCEPT
#endif
#if !defined(SWIFT_C_INLINE_THUNK)
# if __has_attribute(always_inline)
# if __has_attribute(nodebug)
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug))
# else
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline))
# endif
# else
# define SWIFT_C_INLINE_THUNK inline
# endif
#endif
#if defined(_WIN32)
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport)
#endif
#else
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
# define SWIFT_IMPORT_STDLIB_SYMBOL
#endif
#endif
#if defined(__OBJC__)
#if __has_feature(objc_modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
#endif
#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
# undef any
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="DouShouQiModel",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
#if defined(__OBJC__)
#endif
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#if defined(__cplusplus)
#endif
#pragma clang diagnostic pop
#endif
#else
#error unsupported Swift architecture
#endif

@ -1,18 +0,0 @@
//
// DouShouQiModel.h
// DouShouQiModel
//
// Created by Marc Chevaldonné on 14/05/2024.
//
#import <Foundation/Foundation.h>
//! Project version number for DouShouQiModel.
FOUNDATION_EXPORT double DouShouQiModelVersionNumber;
//! Project version string for DouShouQiModel.
FOUNDATION_EXPORT const unsigned char DouShouQiModelVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <DouShouQiModel/PublicHeader.h>

@ -1,266 +0,0 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
// swift-module-flags: -target arm64-apple-ios16.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name DouShouQiModel
// swift-module-flags-ignorable: -enable-bare-slash-regex
@_exported import DouShouQiModel
import Foundation
import Swift
import _Concurrency
import _StringProcessing
import _SwiftConcurrencyShims
public enum Result : Swift.Equatable {
case notFinished
case even
case winner(winner: DouShouQiModel.Owner, reason: DouShouQiModel.WinningReason)
public static func == (a: DouShouQiModel.Result, b: DouShouQiModel.Result) -> Swift.Bool
}
public enum WinningReason {
case denReached, noMorePieces, tooManyOccurences, noMovesLeft
public static func == (a: DouShouQiModel.WinningReason, b: DouShouQiModel.WinningReason) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public enum BoardResult : Swift.Equatable {
case unknown
case ok(piece: DouShouQiModel.Piece?)
case failed(reason: DouShouQiModel.BoardFailingReason)
public static func == (a: DouShouQiModel.BoardResult, b: DouShouQiModel.BoardResult) -> Swift.Bool
}
public enum BoardFailingReason {
case unknown, outOfBounds, cellNotEmpty, cellEmpty
public static func == (a: DouShouQiModel.BoardFailingReason, b: DouShouQiModel.BoardFailingReason) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers public class HumanPlayer : DouShouQiModel.Player {
public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner, andInputMethod input: @escaping (_ hp: DouShouQiModel.HumanPlayer) -> DouShouQiModel.Move?)
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
#if compiler(>=5.3) && $AsyncAwait
override public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
public func changeInput(input: @escaping (_ hp: DouShouQiModel.HumanPlayer) -> DouShouQiModel.Move?)
#if compiler(>=5.3) && $AsyncAwait
public func chooseMove(_ move: DouShouQiModel.Move?) async throws
#endif
@objc deinit
}
public struct ClassicRules : DouShouQiModel.Rules {
public static func createBoard() -> DouShouQiModel.Board
public static func checkBoard(_ board: DouShouQiModel.Board) throws
public init()
public init(occurences: [DouShouQiModel.Board : Swift.Int], historic: [DouShouQiModel.Move])
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
public func isMoveValid(onBoard board: DouShouQiModel.Board, fromRow originRow: Swift.Int, andFromColumn originColumn: Swift.Int, toRow destinationRow: Swift.Int, andToColumn destinationColumn: Swift.Int) -> Swift.Bool
public func isMoveValid(onBoard board: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
public func isGameOver(withBoard board: DouShouQiModel.Board, andLastRowPlayed lastRow: Swift.Int, andLastColumnPlayer lastColumn: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
public mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
public func getNextPlayer() -> DouShouQiModel.Owner
public var occurences: [DouShouQiModel.Board : Swift.Int] {
get
}
public var historic: [DouShouQiModel.Move] {
get
}
}
public struct Cell : Swift.CustomStringConvertible, Swift.Equatable {
public var description: Swift.String {
get
}
public let cellType: DouShouQiModel.CellType
public let initialOwner: DouShouQiModel.Owner
public var piece: DouShouQiModel.Piece?
public init(ofType cellType: DouShouQiModel.CellType, ownedBy initialOwner: DouShouQiModel.Owner = .noOne, withPiece piece: DouShouQiModel.Piece? = nil)
public static func == (a: DouShouQiModel.Cell, b: DouShouQiModel.Cell) -> Swift.Bool
}
public struct VerySimpleRules : DouShouQiModel.Rules {
public static func createBoard() -> DouShouQiModel.Board
public static func checkBoard(_ board: DouShouQiModel.Board) throws
public init()
public init(occurences: [DouShouQiModel.Board : Swift.Int], historic: [DouShouQiModel.Move])
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
public func isMoveValid(onBoard board: DouShouQiModel.Board, fromRow originRow: Swift.Int, andFromColumn originColumn: Swift.Int, toRow destinationRow: Swift.Int, andToColumn destinationColumn: Swift.Int) -> Swift.Bool
public func isMoveValid(onBoard board: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
public func isGameOver(withBoard board: DouShouQiModel.Board, andLastRowPlayed lastRow: Swift.Int, andLastColumnPlayer lastColumn: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
public mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
public func getNextPlayer() -> DouShouQiModel.Owner
public var occurences: [DouShouQiModel.Board : Swift.Int] {
get
}
public var historic: [DouShouQiModel.Move] {
get
}
}
public protocol Rules {
static func createBoard() -> DouShouQiModel.Board
static func checkBoard(_ board: DouShouQiModel.Board) throws
func getNextPlayer() -> DouShouQiModel.Owner
func getMoves(in board: DouShouQiModel.Board, of: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
func getMoves(in board: DouShouQiModel.Board, of: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
func isMoveValid(onBoard: DouShouQiModel.Board, fromRow: Swift.Int, andFromColumn: Swift.Int, toRow: Swift.Int, andToColumn: Swift.Int) -> Swift.Bool
func isMoveValid(onBoard: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
func isGameOver(withBoard: DouShouQiModel.Board, andLastRowPlayed: Swift.Int, andLastColumnPlayer: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
var occurences: [DouShouQiModel.Board : Swift.Int] { get }
var historic: [DouShouQiModel.Move] { get }
}
public class Player {
final public let name: Swift.String
final public let id: DouShouQiModel.Owner
public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
#if compiler(>=5.3) && $AsyncAwait
public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
#if compiler(>=5.3) && $AsyncAwait
public func addPlayedCallbacksListener(_ listener: @escaping (DouShouQiModel.Move?, DouShouQiModel.Player) async throws -> Swift.Void)
#endif
#if compiler(>=5.3) && $AsyncAwait
public func notifyPlayed(withMove move: DouShouQiModel.Move?, andPlayer player: DouShouQiModel.Player) async throws
#endif
@objc deinit
}
public enum GameError : Swift.Error {
case invalidMove, nextPlayerError, badPlayerId(message: Swift.String), invalidRules, invalidPlayer, invalidGame, invalidBoard
}
@_inheritsConvenienceInitializers public class RandomPlayer : DouShouQiModel.IAPlayer {
#if compiler(>=5.3) && $AsyncAwait
override public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
@objc deinit
}
public enum CellType : Swift.CaseIterable {
case unknown, jungle, water, trap, den
public static func == (a: DouShouQiModel.CellType, b: DouShouQiModel.CellType) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public typealias AllCases = [DouShouQiModel.CellType]
public static var allCases: [DouShouQiModel.CellType] {
get
}
public var hashValue: Swift.Int {
get
}
}
public struct Board : Swift.Hashable {
public func hash(into hasher: inout Swift.Hasher)
public let nbRows: Swift.Int
public let nbColumns: Swift.Int
public var grid: [[DouShouQiModel.Cell]] {
get
}
public init?(withGrid grid: [[DouShouQiModel.Cell]])
public func countPieces(of owner: DouShouQiModel.Owner) -> Swift.Int
public func countPieces() -> (nbOfPiecesOfPlayer1: Swift.Int, nbOfPiecesOfPlayer2: Swift.Int)
public mutating func insert(piece: DouShouQiModel.Piece, atRow row: Swift.Int, andColumn column: Swift.Int) -> DouShouQiModel.BoardResult
public mutating func removePiece(atRow row: Swift.Int, andColumn column: Swift.Int) -> DouShouQiModel.BoardResult
public static func == (a: DouShouQiModel.Board, b: DouShouQiModel.Board) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
}
public struct Piece : Swift.CustomStringConvertible, Swift.Hashable {
public var description: Swift.String {
get
}
public let owner: DouShouQiModel.Owner
public let animal: DouShouQiModel.Animal
public init(withOwner owner: DouShouQiModel.Owner, andAnimal animal: DouShouQiModel.Animal)
public func hash(into hasher: inout Swift.Hasher)
public static func == (a: DouShouQiModel.Piece, b: DouShouQiModel.Piece) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
}
public enum InvalidBoardError : Swift.Error, Swift.Equatable {
case unknownError
case badDimensions(nbRows: Swift.Int, nbColumns: Swift.Int)
case badCellType(cellType: DouShouQiModel.CellType, row: Swift.Int, column: Swift.Int)
case multipleOccurenceOfSamePiece(piece: DouShouQiModel.Piece)
case pieceWithNoOwner(piece: DouShouQiModel.Piece)
case pieceNotAllowedOnThisCell(piece: DouShouQiModel.Piece, cell: DouShouQiModel.Cell)
public static func == (a: DouShouQiModel.InvalidBoardError, b: DouShouQiModel.InvalidBoardError) -> Swift.Bool
}
public enum Owner {
case noOne, player1, player2
public var simpleDescription: Swift.String {
get
}
public static func == (a: DouShouQiModel.Owner, b: DouShouQiModel.Owner) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers public class IAPlayer : DouShouQiModel.Player {
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
@objc deinit
}
public struct Move : Swift.CustomStringConvertible, Swift.Equatable {
public let owner: DouShouQiModel.Owner
public let rowOrigin: Swift.Int
public let columnOrigin: Swift.Int
public let rowDestination: Swift.Int
public let columnDestination: Swift.Int
public init(of owner: DouShouQiModel.Owner, fromRow rowOrigin: Swift.Int, andFromColumn colOrigin: Swift.Int, toRow rowDest: Swift.Int, andToColumn colDest: Swift.Int)
public var description: Swift.String {
get
}
public static func == (a: DouShouQiModel.Move, b: DouShouQiModel.Move) -> Swift.Bool
}
public enum Animal : Swift.Int {
case rat, cat, dog, wolf, leopard, tiger, lion, elephant
public init?(rawValue: Swift.Int)
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
public class Game {
public var board: DouShouQiModel.Board {
get
}
public var rules: any DouShouQiModel.Rules {
get
}
final public let players: [DouShouQiModel.Owner : DouShouQiModel.Player]
public init(withRules rules: any DouShouQiModel.Rules, andPlayer1 player1: DouShouQiModel.Player, andPlayer2 player2: DouShouQiModel.Player) throws
public init(withBoard board: DouShouQiModel.Board, andRules rules: any DouShouQiModel.Rules, andPlayer1 player1: DouShouQiModel.Player, andPlayer2 player2: DouShouQiModel.Player) throws
public func addGameStartedListener(_ listener: @escaping (DouShouQiModel.Board) -> Swift.Void)
#if compiler(>=5.3) && $AsyncAwait
public func addPlayerNotifiedListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Player) async throws -> Swift.Void)
#endif
#if compiler(>=5.3) && $AsyncAwait
public func addGameChangedListener(_ listener: @escaping (DouShouQiModel.Game) async -> Swift.Void)
#endif
public func addGameOverListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Result, DouShouQiModel.Player?) -> Swift.Void)
public func addMoveChosenCallbacksListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Move, DouShouQiModel.Player) -> Swift.Void)
public func addInvalidMoveCallbacksListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Move, DouShouQiModel.Player, Swift.Bool) -> Swift.Void)
public func addBoardChangedListener(_ listener: @escaping (DouShouQiModel.Board) -> Swift.Void)
public func addPieceRemovedListener(_ listener: @escaping (Swift.Int, Swift.Int, DouShouQiModel.Piece) -> Swift.Void)
#if compiler(>=5.3) && $AsyncAwait
public func onPlayed(with move: DouShouQiModel.Move?, from player: DouShouQiModel.Player) async throws
#endif
public var isOver: Swift.Bool {
get
}
#if compiler(>=5.3) && $AsyncAwait
public func start() async throws
#endif
@objc deinit
}
extension DouShouQiModel.WinningReason : Swift.Equatable {}
extension DouShouQiModel.WinningReason : Swift.Hashable {}
extension DouShouQiModel.BoardFailingReason : Swift.Equatable {}
extension DouShouQiModel.BoardFailingReason : Swift.Hashable {}
extension DouShouQiModel.CellType : Swift.Equatable {}
extension DouShouQiModel.CellType : Swift.Hashable {}
extension DouShouQiModel.Owner : Swift.Equatable {}
extension DouShouQiModel.Owner : Swift.Hashable {}
extension DouShouQiModel.Animal : Swift.Equatable {}
extension DouShouQiModel.Animal : Swift.Hashable {}
extension DouShouQiModel.Animal : Swift.RawRepresentable {}

@ -1,266 +0,0 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
// swift-module-flags: -target arm64-apple-ios16.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name DouShouQiModel
// swift-module-flags-ignorable: -enable-bare-slash-regex
@_exported import DouShouQiModel
import Foundation
import Swift
import _Concurrency
import _StringProcessing
import _SwiftConcurrencyShims
public enum Result : Swift.Equatable {
case notFinished
case even
case winner(winner: DouShouQiModel.Owner, reason: DouShouQiModel.WinningReason)
public static func == (a: DouShouQiModel.Result, b: DouShouQiModel.Result) -> Swift.Bool
}
public enum WinningReason {
case denReached, noMorePieces, tooManyOccurences, noMovesLeft
public static func == (a: DouShouQiModel.WinningReason, b: DouShouQiModel.WinningReason) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public enum BoardResult : Swift.Equatable {
case unknown
case ok(piece: DouShouQiModel.Piece?)
case failed(reason: DouShouQiModel.BoardFailingReason)
public static func == (a: DouShouQiModel.BoardResult, b: DouShouQiModel.BoardResult) -> Swift.Bool
}
public enum BoardFailingReason {
case unknown, outOfBounds, cellNotEmpty, cellEmpty
public static func == (a: DouShouQiModel.BoardFailingReason, b: DouShouQiModel.BoardFailingReason) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers public class HumanPlayer : DouShouQiModel.Player {
public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner, andInputMethod input: @escaping (_ hp: DouShouQiModel.HumanPlayer) -> DouShouQiModel.Move?)
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
#if compiler(>=5.3) && $AsyncAwait
override public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
public func changeInput(input: @escaping (_ hp: DouShouQiModel.HumanPlayer) -> DouShouQiModel.Move?)
#if compiler(>=5.3) && $AsyncAwait
public func chooseMove(_ move: DouShouQiModel.Move?) async throws
#endif
@objc deinit
}
public struct ClassicRules : DouShouQiModel.Rules {
public static func createBoard() -> DouShouQiModel.Board
public static func checkBoard(_ board: DouShouQiModel.Board) throws
public init()
public init(occurences: [DouShouQiModel.Board : Swift.Int], historic: [DouShouQiModel.Move])
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
public func isMoveValid(onBoard board: DouShouQiModel.Board, fromRow originRow: Swift.Int, andFromColumn originColumn: Swift.Int, toRow destinationRow: Swift.Int, andToColumn destinationColumn: Swift.Int) -> Swift.Bool
public func isMoveValid(onBoard board: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
public func isGameOver(withBoard board: DouShouQiModel.Board, andLastRowPlayed lastRow: Swift.Int, andLastColumnPlayer lastColumn: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
public mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
public func getNextPlayer() -> DouShouQiModel.Owner
public var occurences: [DouShouQiModel.Board : Swift.Int] {
get
}
public var historic: [DouShouQiModel.Move] {
get
}
}
public struct Cell : Swift.CustomStringConvertible, Swift.Equatable {
public var description: Swift.String {
get
}
public let cellType: DouShouQiModel.CellType
public let initialOwner: DouShouQiModel.Owner
public var piece: DouShouQiModel.Piece?
public init(ofType cellType: DouShouQiModel.CellType, ownedBy initialOwner: DouShouQiModel.Owner = .noOne, withPiece piece: DouShouQiModel.Piece? = nil)
public static func == (a: DouShouQiModel.Cell, b: DouShouQiModel.Cell) -> Swift.Bool
}
public struct VerySimpleRules : DouShouQiModel.Rules {
public static func createBoard() -> DouShouQiModel.Board
public static func checkBoard(_ board: DouShouQiModel.Board) throws
public init()
public init(occurences: [DouShouQiModel.Board : Swift.Int], historic: [DouShouQiModel.Move])
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
public func isMoveValid(onBoard board: DouShouQiModel.Board, fromRow originRow: Swift.Int, andFromColumn originColumn: Swift.Int, toRow destinationRow: Swift.Int, andToColumn destinationColumn: Swift.Int) -> Swift.Bool
public func isMoveValid(onBoard board: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
public func isGameOver(withBoard board: DouShouQiModel.Board, andLastRowPlayed lastRow: Swift.Int, andLastColumnPlayer lastColumn: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
public mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
public func getNextPlayer() -> DouShouQiModel.Owner
public var occurences: [DouShouQiModel.Board : Swift.Int] {
get
}
public var historic: [DouShouQiModel.Move] {
get
}
}
public protocol Rules {
static func createBoard() -> DouShouQiModel.Board
static func checkBoard(_ board: DouShouQiModel.Board) throws
func getNextPlayer() -> DouShouQiModel.Owner
func getMoves(in board: DouShouQiModel.Board, of: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
func getMoves(in board: DouShouQiModel.Board, of: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
func isMoveValid(onBoard: DouShouQiModel.Board, fromRow: Swift.Int, andFromColumn: Swift.Int, toRow: Swift.Int, andToColumn: Swift.Int) -> Swift.Bool
func isMoveValid(onBoard: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
func isGameOver(withBoard: DouShouQiModel.Board, andLastRowPlayed: Swift.Int, andLastColumnPlayer: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
var occurences: [DouShouQiModel.Board : Swift.Int] { get }
var historic: [DouShouQiModel.Move] { get }
}
public class Player {
final public let name: Swift.String
final public let id: DouShouQiModel.Owner
public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
#if compiler(>=5.3) && $AsyncAwait
public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
#if compiler(>=5.3) && $AsyncAwait
public func addPlayedCallbacksListener(_ listener: @escaping (DouShouQiModel.Move?, DouShouQiModel.Player) async throws -> Swift.Void)
#endif
#if compiler(>=5.3) && $AsyncAwait
public func notifyPlayed(withMove move: DouShouQiModel.Move?, andPlayer player: DouShouQiModel.Player) async throws
#endif
@objc deinit
}
public enum GameError : Swift.Error {
case invalidMove, nextPlayerError, badPlayerId(message: Swift.String), invalidRules, invalidPlayer, invalidGame, invalidBoard
}
@_inheritsConvenienceInitializers public class RandomPlayer : DouShouQiModel.IAPlayer {
#if compiler(>=5.3) && $AsyncAwait
override public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
@objc deinit
}
public enum CellType : Swift.CaseIterable {
case unknown, jungle, water, trap, den
public static func == (a: DouShouQiModel.CellType, b: DouShouQiModel.CellType) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public typealias AllCases = [DouShouQiModel.CellType]
public static var allCases: [DouShouQiModel.CellType] {
get
}
public var hashValue: Swift.Int {
get
}
}
public struct Board : Swift.Hashable {
public func hash(into hasher: inout Swift.Hasher)
public let nbRows: Swift.Int
public let nbColumns: Swift.Int
public var grid: [[DouShouQiModel.Cell]] {
get
}
public init?(withGrid grid: [[DouShouQiModel.Cell]])
public func countPieces(of owner: DouShouQiModel.Owner) -> Swift.Int
public func countPieces() -> (nbOfPiecesOfPlayer1: Swift.Int, nbOfPiecesOfPlayer2: Swift.Int)
public mutating func insert(piece: DouShouQiModel.Piece, atRow row: Swift.Int, andColumn column: Swift.Int) -> DouShouQiModel.BoardResult
public mutating func removePiece(atRow row: Swift.Int, andColumn column: Swift.Int) -> DouShouQiModel.BoardResult
public static func == (a: DouShouQiModel.Board, b: DouShouQiModel.Board) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
}
public struct Piece : Swift.CustomStringConvertible, Swift.Hashable {
public var description: Swift.String {
get
}
public let owner: DouShouQiModel.Owner
public let animal: DouShouQiModel.Animal
public init(withOwner owner: DouShouQiModel.Owner, andAnimal animal: DouShouQiModel.Animal)
public func hash(into hasher: inout Swift.Hasher)
public static func == (a: DouShouQiModel.Piece, b: DouShouQiModel.Piece) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
}
public enum InvalidBoardError : Swift.Error, Swift.Equatable {
case unknownError
case badDimensions(nbRows: Swift.Int, nbColumns: Swift.Int)
case badCellType(cellType: DouShouQiModel.CellType, row: Swift.Int, column: Swift.Int)
case multipleOccurenceOfSamePiece(piece: DouShouQiModel.Piece)
case pieceWithNoOwner(piece: DouShouQiModel.Piece)
case pieceNotAllowedOnThisCell(piece: DouShouQiModel.Piece, cell: DouShouQiModel.Cell)
public static func == (a: DouShouQiModel.InvalidBoardError, b: DouShouQiModel.InvalidBoardError) -> Swift.Bool
}
public enum Owner {
case noOne, player1, player2
public var simpleDescription: Swift.String {
get
}
public static func == (a: DouShouQiModel.Owner, b: DouShouQiModel.Owner) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers public class IAPlayer : DouShouQiModel.Player {
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
@objc deinit
}
public struct Move : Swift.CustomStringConvertible, Swift.Equatable {
public let owner: DouShouQiModel.Owner
public let rowOrigin: Swift.Int
public let columnOrigin: Swift.Int
public let rowDestination: Swift.Int
public let columnDestination: Swift.Int
public init(of owner: DouShouQiModel.Owner, fromRow rowOrigin: Swift.Int, andFromColumn colOrigin: Swift.Int, toRow rowDest: Swift.Int, andToColumn colDest: Swift.Int)
public var description: Swift.String {
get
}
public static func == (a: DouShouQiModel.Move, b: DouShouQiModel.Move) -> Swift.Bool
}
public enum Animal : Swift.Int {
case rat, cat, dog, wolf, leopard, tiger, lion, elephant
public init?(rawValue: Swift.Int)
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
public class Game {
public var board: DouShouQiModel.Board {
get
}
public var rules: any DouShouQiModel.Rules {
get
}
final public let players: [DouShouQiModel.Owner : DouShouQiModel.Player]
public init(withRules rules: any DouShouQiModel.Rules, andPlayer1 player1: DouShouQiModel.Player, andPlayer2 player2: DouShouQiModel.Player) throws
public init(withBoard board: DouShouQiModel.Board, andRules rules: any DouShouQiModel.Rules, andPlayer1 player1: DouShouQiModel.Player, andPlayer2 player2: DouShouQiModel.Player) throws
public func addGameStartedListener(_ listener: @escaping (DouShouQiModel.Board) -> Swift.Void)
#if compiler(>=5.3) && $AsyncAwait
public func addPlayerNotifiedListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Player) async throws -> Swift.Void)
#endif
#if compiler(>=5.3) && $AsyncAwait
public func addGameChangedListener(_ listener: @escaping (DouShouQiModel.Game) async -> Swift.Void)
#endif
public func addGameOverListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Result, DouShouQiModel.Player?) -> Swift.Void)
public func addMoveChosenCallbacksListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Move, DouShouQiModel.Player) -> Swift.Void)
public func addInvalidMoveCallbacksListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Move, DouShouQiModel.Player, Swift.Bool) -> Swift.Void)
public func addBoardChangedListener(_ listener: @escaping (DouShouQiModel.Board) -> Swift.Void)
public func addPieceRemovedListener(_ listener: @escaping (Swift.Int, Swift.Int, DouShouQiModel.Piece) -> Swift.Void)
#if compiler(>=5.3) && $AsyncAwait
public func onPlayed(with move: DouShouQiModel.Move?, from player: DouShouQiModel.Player) async throws
#endif
public var isOver: Swift.Bool {
get
}
#if compiler(>=5.3) && $AsyncAwait
public func start() async throws
#endif
@objc deinit
}
extension DouShouQiModel.WinningReason : Swift.Equatable {}
extension DouShouQiModel.WinningReason : Swift.Hashable {}
extension DouShouQiModel.BoardFailingReason : Swift.Equatable {}
extension DouShouQiModel.BoardFailingReason : Swift.Hashable {}
extension DouShouQiModel.CellType : Swift.Equatable {}
extension DouShouQiModel.CellType : Swift.Hashable {}
extension DouShouQiModel.Owner : Swift.Equatable {}
extension DouShouQiModel.Owner : Swift.Hashable {}
extension DouShouQiModel.Animal : Swift.Equatable {}
extension DouShouQiModel.Animal : Swift.Hashable {}
extension DouShouQiModel.Animal : Swift.RawRepresentable {}

@ -1,266 +0,0 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
// swift-module-flags: -target x86_64-apple-ios16.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name DouShouQiModel
// swift-module-flags-ignorable: -enable-bare-slash-regex
@_exported import DouShouQiModel
import Foundation
import Swift
import _Concurrency
import _StringProcessing
import _SwiftConcurrencyShims
public enum Result : Swift.Equatable {
case notFinished
case even
case winner(winner: DouShouQiModel.Owner, reason: DouShouQiModel.WinningReason)
public static func == (a: DouShouQiModel.Result, b: DouShouQiModel.Result) -> Swift.Bool
}
public enum WinningReason {
case denReached, noMorePieces, tooManyOccurences, noMovesLeft
public static func == (a: DouShouQiModel.WinningReason, b: DouShouQiModel.WinningReason) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public enum BoardResult : Swift.Equatable {
case unknown
case ok(piece: DouShouQiModel.Piece?)
case failed(reason: DouShouQiModel.BoardFailingReason)
public static func == (a: DouShouQiModel.BoardResult, b: DouShouQiModel.BoardResult) -> Swift.Bool
}
public enum BoardFailingReason {
case unknown, outOfBounds, cellNotEmpty, cellEmpty
public static func == (a: DouShouQiModel.BoardFailingReason, b: DouShouQiModel.BoardFailingReason) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers public class HumanPlayer : DouShouQiModel.Player {
public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner, andInputMethod input: @escaping (_ hp: DouShouQiModel.HumanPlayer) -> DouShouQiModel.Move?)
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
#if compiler(>=5.3) && $AsyncAwait
override public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
public func changeInput(input: @escaping (_ hp: DouShouQiModel.HumanPlayer) -> DouShouQiModel.Move?)
#if compiler(>=5.3) && $AsyncAwait
public func chooseMove(_ move: DouShouQiModel.Move?) async throws
#endif
@objc deinit
}
public struct ClassicRules : DouShouQiModel.Rules {
public static func createBoard() -> DouShouQiModel.Board
public static func checkBoard(_ board: DouShouQiModel.Board) throws
public init()
public init(occurences: [DouShouQiModel.Board : Swift.Int], historic: [DouShouQiModel.Move])
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
public func isMoveValid(onBoard board: DouShouQiModel.Board, fromRow originRow: Swift.Int, andFromColumn originColumn: Swift.Int, toRow destinationRow: Swift.Int, andToColumn destinationColumn: Swift.Int) -> Swift.Bool
public func isMoveValid(onBoard board: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
public func isGameOver(withBoard board: DouShouQiModel.Board, andLastRowPlayed lastRow: Swift.Int, andLastColumnPlayer lastColumn: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
public mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
public func getNextPlayer() -> DouShouQiModel.Owner
public var occurences: [DouShouQiModel.Board : Swift.Int] {
get
}
public var historic: [DouShouQiModel.Move] {
get
}
}
public struct Cell : Swift.CustomStringConvertible, Swift.Equatable {
public var description: Swift.String {
get
}
public let cellType: DouShouQiModel.CellType
public let initialOwner: DouShouQiModel.Owner
public var piece: DouShouQiModel.Piece?
public init(ofType cellType: DouShouQiModel.CellType, ownedBy initialOwner: DouShouQiModel.Owner = .noOne, withPiece piece: DouShouQiModel.Piece? = nil)
public static func == (a: DouShouQiModel.Cell, b: DouShouQiModel.Cell) -> Swift.Bool
}
public struct VerySimpleRules : DouShouQiModel.Rules {
public static func createBoard() -> DouShouQiModel.Board
public static func checkBoard(_ board: DouShouQiModel.Board) throws
public init()
public init(occurences: [DouShouQiModel.Board : Swift.Int], historic: [DouShouQiModel.Move])
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
public func isMoveValid(onBoard board: DouShouQiModel.Board, fromRow originRow: Swift.Int, andFromColumn originColumn: Swift.Int, toRow destinationRow: Swift.Int, andToColumn destinationColumn: Swift.Int) -> Swift.Bool
public func isMoveValid(onBoard board: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
public func isGameOver(withBoard board: DouShouQiModel.Board, andLastRowPlayed lastRow: Swift.Int, andLastColumnPlayer lastColumn: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
public mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
public func getNextPlayer() -> DouShouQiModel.Owner
public var occurences: [DouShouQiModel.Board : Swift.Int] {
get
}
public var historic: [DouShouQiModel.Move] {
get
}
}
public protocol Rules {
static func createBoard() -> DouShouQiModel.Board
static func checkBoard(_ board: DouShouQiModel.Board) throws
func getNextPlayer() -> DouShouQiModel.Owner
func getMoves(in board: DouShouQiModel.Board, of: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
func getMoves(in board: DouShouQiModel.Board, of: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
func isMoveValid(onBoard: DouShouQiModel.Board, fromRow: Swift.Int, andFromColumn: Swift.Int, toRow: Swift.Int, andToColumn: Swift.Int) -> Swift.Bool
func isMoveValid(onBoard: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
func isGameOver(withBoard: DouShouQiModel.Board, andLastRowPlayed: Swift.Int, andLastColumnPlayer: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
var occurences: [DouShouQiModel.Board : Swift.Int] { get }
var historic: [DouShouQiModel.Move] { get }
}
public class Player {
final public let name: Swift.String
final public let id: DouShouQiModel.Owner
public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
#if compiler(>=5.3) && $AsyncAwait
public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
#if compiler(>=5.3) && $AsyncAwait
public func addPlayedCallbacksListener(_ listener: @escaping (DouShouQiModel.Move?, DouShouQiModel.Player) async throws -> Swift.Void)
#endif
#if compiler(>=5.3) && $AsyncAwait
public func notifyPlayed(withMove move: DouShouQiModel.Move?, andPlayer player: DouShouQiModel.Player) async throws
#endif
@objc deinit
}
public enum GameError : Swift.Error {
case invalidMove, nextPlayerError, badPlayerId(message: Swift.String), invalidRules, invalidPlayer, invalidGame, invalidBoard
}
@_inheritsConvenienceInitializers public class RandomPlayer : DouShouQiModel.IAPlayer {
#if compiler(>=5.3) && $AsyncAwait
override public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
@objc deinit
}
public enum CellType : Swift.CaseIterable {
case unknown, jungle, water, trap, den
public static func == (a: DouShouQiModel.CellType, b: DouShouQiModel.CellType) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public typealias AllCases = [DouShouQiModel.CellType]
public static var allCases: [DouShouQiModel.CellType] {
get
}
public var hashValue: Swift.Int {
get
}
}
public struct Board : Swift.Hashable {
public func hash(into hasher: inout Swift.Hasher)
public let nbRows: Swift.Int
public let nbColumns: Swift.Int
public var grid: [[DouShouQiModel.Cell]] {
get
}
public init?(withGrid grid: [[DouShouQiModel.Cell]])
public func countPieces(of owner: DouShouQiModel.Owner) -> Swift.Int
public func countPieces() -> (nbOfPiecesOfPlayer1: Swift.Int, nbOfPiecesOfPlayer2: Swift.Int)
public mutating func insert(piece: DouShouQiModel.Piece, atRow row: Swift.Int, andColumn column: Swift.Int) -> DouShouQiModel.BoardResult
public mutating func removePiece(atRow row: Swift.Int, andColumn column: Swift.Int) -> DouShouQiModel.BoardResult
public static func == (a: DouShouQiModel.Board, b: DouShouQiModel.Board) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
}
public struct Piece : Swift.CustomStringConvertible, Swift.Hashable {
public var description: Swift.String {
get
}
public let owner: DouShouQiModel.Owner
public let animal: DouShouQiModel.Animal
public init(withOwner owner: DouShouQiModel.Owner, andAnimal animal: DouShouQiModel.Animal)
public func hash(into hasher: inout Swift.Hasher)
public static func == (a: DouShouQiModel.Piece, b: DouShouQiModel.Piece) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
}
public enum InvalidBoardError : Swift.Error, Swift.Equatable {
case unknownError
case badDimensions(nbRows: Swift.Int, nbColumns: Swift.Int)
case badCellType(cellType: DouShouQiModel.CellType, row: Swift.Int, column: Swift.Int)
case multipleOccurenceOfSamePiece(piece: DouShouQiModel.Piece)
case pieceWithNoOwner(piece: DouShouQiModel.Piece)
case pieceNotAllowedOnThisCell(piece: DouShouQiModel.Piece, cell: DouShouQiModel.Cell)
public static func == (a: DouShouQiModel.InvalidBoardError, b: DouShouQiModel.InvalidBoardError) -> Swift.Bool
}
public enum Owner {
case noOne, player1, player2
public var simpleDescription: Swift.String {
get
}
public static func == (a: DouShouQiModel.Owner, b: DouShouQiModel.Owner) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers public class IAPlayer : DouShouQiModel.Player {
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
@objc deinit
}
public struct Move : Swift.CustomStringConvertible, Swift.Equatable {
public let owner: DouShouQiModel.Owner
public let rowOrigin: Swift.Int
public let columnOrigin: Swift.Int
public let rowDestination: Swift.Int
public let columnDestination: Swift.Int
public init(of owner: DouShouQiModel.Owner, fromRow rowOrigin: Swift.Int, andFromColumn colOrigin: Swift.Int, toRow rowDest: Swift.Int, andToColumn colDest: Swift.Int)
public var description: Swift.String {
get
}
public static func == (a: DouShouQiModel.Move, b: DouShouQiModel.Move) -> Swift.Bool
}
public enum Animal : Swift.Int {
case rat, cat, dog, wolf, leopard, tiger, lion, elephant
public init?(rawValue: Swift.Int)
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
public class Game {
public var board: DouShouQiModel.Board {
get
}
public var rules: any DouShouQiModel.Rules {
get
}
final public let players: [DouShouQiModel.Owner : DouShouQiModel.Player]
public init(withRules rules: any DouShouQiModel.Rules, andPlayer1 player1: DouShouQiModel.Player, andPlayer2 player2: DouShouQiModel.Player) throws
public init(withBoard board: DouShouQiModel.Board, andRules rules: any DouShouQiModel.Rules, andPlayer1 player1: DouShouQiModel.Player, andPlayer2 player2: DouShouQiModel.Player) throws
public func addGameStartedListener(_ listener: @escaping (DouShouQiModel.Board) -> Swift.Void)
#if compiler(>=5.3) && $AsyncAwait
public func addPlayerNotifiedListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Player) async throws -> Swift.Void)
#endif
#if compiler(>=5.3) && $AsyncAwait
public func addGameChangedListener(_ listener: @escaping (DouShouQiModel.Game) async -> Swift.Void)
#endif
public func addGameOverListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Result, DouShouQiModel.Player?) -> Swift.Void)
public func addMoveChosenCallbacksListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Move, DouShouQiModel.Player) -> Swift.Void)
public func addInvalidMoveCallbacksListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Move, DouShouQiModel.Player, Swift.Bool) -> Swift.Void)
public func addBoardChangedListener(_ listener: @escaping (DouShouQiModel.Board) -> Swift.Void)
public func addPieceRemovedListener(_ listener: @escaping (Swift.Int, Swift.Int, DouShouQiModel.Piece) -> Swift.Void)
#if compiler(>=5.3) && $AsyncAwait
public func onPlayed(with move: DouShouQiModel.Move?, from player: DouShouQiModel.Player) async throws
#endif
public var isOver: Swift.Bool {
get
}
#if compiler(>=5.3) && $AsyncAwait
public func start() async throws
#endif
@objc deinit
}
extension DouShouQiModel.WinningReason : Swift.Equatable {}
extension DouShouQiModel.WinningReason : Swift.Hashable {}
extension DouShouQiModel.BoardFailingReason : Swift.Equatable {}
extension DouShouQiModel.BoardFailingReason : Swift.Hashable {}
extension DouShouQiModel.CellType : Swift.Equatable {}
extension DouShouQiModel.CellType : Swift.Hashable {}
extension DouShouQiModel.Owner : Swift.Equatable {}
extension DouShouQiModel.Owner : Swift.Hashable {}
extension DouShouQiModel.Animal : Swift.Equatable {}
extension DouShouQiModel.Animal : Swift.Hashable {}
extension DouShouQiModel.Animal : Swift.RawRepresentable {}

@ -1,266 +0,0 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
// swift-module-flags: -target x86_64-apple-ios16.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name DouShouQiModel
// swift-module-flags-ignorable: -enable-bare-slash-regex
@_exported import DouShouQiModel
import Foundation
import Swift
import _Concurrency
import _StringProcessing
import _SwiftConcurrencyShims
public enum Result : Swift.Equatable {
case notFinished
case even
case winner(winner: DouShouQiModel.Owner, reason: DouShouQiModel.WinningReason)
public static func == (a: DouShouQiModel.Result, b: DouShouQiModel.Result) -> Swift.Bool
}
public enum WinningReason {
case denReached, noMorePieces, tooManyOccurences, noMovesLeft
public static func == (a: DouShouQiModel.WinningReason, b: DouShouQiModel.WinningReason) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public enum BoardResult : Swift.Equatable {
case unknown
case ok(piece: DouShouQiModel.Piece?)
case failed(reason: DouShouQiModel.BoardFailingReason)
public static func == (a: DouShouQiModel.BoardResult, b: DouShouQiModel.BoardResult) -> Swift.Bool
}
public enum BoardFailingReason {
case unknown, outOfBounds, cellNotEmpty, cellEmpty
public static func == (a: DouShouQiModel.BoardFailingReason, b: DouShouQiModel.BoardFailingReason) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers public class HumanPlayer : DouShouQiModel.Player {
public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner, andInputMethod input: @escaping (_ hp: DouShouQiModel.HumanPlayer) -> DouShouQiModel.Move?)
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
#if compiler(>=5.3) && $AsyncAwait
override public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
public func changeInput(input: @escaping (_ hp: DouShouQiModel.HumanPlayer) -> DouShouQiModel.Move?)
#if compiler(>=5.3) && $AsyncAwait
public func chooseMove(_ move: DouShouQiModel.Move?) async throws
#endif
@objc deinit
}
public struct ClassicRules : DouShouQiModel.Rules {
public static func createBoard() -> DouShouQiModel.Board
public static func checkBoard(_ board: DouShouQiModel.Board) throws
public init()
public init(occurences: [DouShouQiModel.Board : Swift.Int], historic: [DouShouQiModel.Move])
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
public func isMoveValid(onBoard board: DouShouQiModel.Board, fromRow originRow: Swift.Int, andFromColumn originColumn: Swift.Int, toRow destinationRow: Swift.Int, andToColumn destinationColumn: Swift.Int) -> Swift.Bool
public func isMoveValid(onBoard board: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
public func isGameOver(withBoard board: DouShouQiModel.Board, andLastRowPlayed lastRow: Swift.Int, andLastColumnPlayer lastColumn: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
public mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
public func getNextPlayer() -> DouShouQiModel.Owner
public var occurences: [DouShouQiModel.Board : Swift.Int] {
get
}
public var historic: [DouShouQiModel.Move] {
get
}
}
public struct Cell : Swift.CustomStringConvertible, Swift.Equatable {
public var description: Swift.String {
get
}
public let cellType: DouShouQiModel.CellType
public let initialOwner: DouShouQiModel.Owner
public var piece: DouShouQiModel.Piece?
public init(ofType cellType: DouShouQiModel.CellType, ownedBy initialOwner: DouShouQiModel.Owner = .noOne, withPiece piece: DouShouQiModel.Piece? = nil)
public static func == (a: DouShouQiModel.Cell, b: DouShouQiModel.Cell) -> Swift.Bool
}
public struct VerySimpleRules : DouShouQiModel.Rules {
public static func createBoard() -> DouShouQiModel.Board
public static func checkBoard(_ board: DouShouQiModel.Board) throws
public init()
public init(occurences: [DouShouQiModel.Board : Swift.Int], historic: [DouShouQiModel.Move])
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
public func isMoveValid(onBoard board: DouShouQiModel.Board, fromRow originRow: Swift.Int, andFromColumn originColumn: Swift.Int, toRow destinationRow: Swift.Int, andToColumn destinationColumn: Swift.Int) -> Swift.Bool
public func isMoveValid(onBoard board: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
public func isGameOver(withBoard board: DouShouQiModel.Board, andLastRowPlayed lastRow: Swift.Int, andLastColumnPlayer lastColumn: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
public mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
public func getNextPlayer() -> DouShouQiModel.Owner
public var occurences: [DouShouQiModel.Board : Swift.Int] {
get
}
public var historic: [DouShouQiModel.Move] {
get
}
}
public protocol Rules {
static func createBoard() -> DouShouQiModel.Board
static func checkBoard(_ board: DouShouQiModel.Board) throws
func getNextPlayer() -> DouShouQiModel.Owner
func getMoves(in board: DouShouQiModel.Board, of: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
func getMoves(in board: DouShouQiModel.Board, of: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
func isMoveValid(onBoard: DouShouQiModel.Board, fromRow: Swift.Int, andFromColumn: Swift.Int, toRow: Swift.Int, andToColumn: Swift.Int) -> Swift.Bool
func isMoveValid(onBoard: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
func isGameOver(withBoard: DouShouQiModel.Board, andLastRowPlayed: Swift.Int, andLastColumnPlayer: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
var occurences: [DouShouQiModel.Board : Swift.Int] { get }
var historic: [DouShouQiModel.Move] { get }
}
public class Player {
final public let name: Swift.String
final public let id: DouShouQiModel.Owner
public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
#if compiler(>=5.3) && $AsyncAwait
public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
#if compiler(>=5.3) && $AsyncAwait
public func addPlayedCallbacksListener(_ listener: @escaping (DouShouQiModel.Move?, DouShouQiModel.Player) async throws -> Swift.Void)
#endif
#if compiler(>=5.3) && $AsyncAwait
public func notifyPlayed(withMove move: DouShouQiModel.Move?, andPlayer player: DouShouQiModel.Player) async throws
#endif
@objc deinit
}
public enum GameError : Swift.Error {
case invalidMove, nextPlayerError, badPlayerId(message: Swift.String), invalidRules, invalidPlayer, invalidGame, invalidBoard
}
@_inheritsConvenienceInitializers public class RandomPlayer : DouShouQiModel.IAPlayer {
#if compiler(>=5.3) && $AsyncAwait
override public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
@objc deinit
}
public enum CellType : Swift.CaseIterable {
case unknown, jungle, water, trap, den
public static func == (a: DouShouQiModel.CellType, b: DouShouQiModel.CellType) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public typealias AllCases = [DouShouQiModel.CellType]
public static var allCases: [DouShouQiModel.CellType] {
get
}
public var hashValue: Swift.Int {
get
}
}
public struct Board : Swift.Hashable {
public func hash(into hasher: inout Swift.Hasher)
public let nbRows: Swift.Int
public let nbColumns: Swift.Int
public var grid: [[DouShouQiModel.Cell]] {
get
}
public init?(withGrid grid: [[DouShouQiModel.Cell]])
public func countPieces(of owner: DouShouQiModel.Owner) -> Swift.Int
public func countPieces() -> (nbOfPiecesOfPlayer1: Swift.Int, nbOfPiecesOfPlayer2: Swift.Int)
public mutating func insert(piece: DouShouQiModel.Piece, atRow row: Swift.Int, andColumn column: Swift.Int) -> DouShouQiModel.BoardResult
public mutating func removePiece(atRow row: Swift.Int, andColumn column: Swift.Int) -> DouShouQiModel.BoardResult
public static func == (a: DouShouQiModel.Board, b: DouShouQiModel.Board) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
}
public struct Piece : Swift.CustomStringConvertible, Swift.Hashable {
public var description: Swift.String {
get
}
public let owner: DouShouQiModel.Owner
public let animal: DouShouQiModel.Animal
public init(withOwner owner: DouShouQiModel.Owner, andAnimal animal: DouShouQiModel.Animal)
public func hash(into hasher: inout Swift.Hasher)
public static func == (a: DouShouQiModel.Piece, b: DouShouQiModel.Piece) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
}
public enum InvalidBoardError : Swift.Error, Swift.Equatable {
case unknownError
case badDimensions(nbRows: Swift.Int, nbColumns: Swift.Int)
case badCellType(cellType: DouShouQiModel.CellType, row: Swift.Int, column: Swift.Int)
case multipleOccurenceOfSamePiece(piece: DouShouQiModel.Piece)
case pieceWithNoOwner(piece: DouShouQiModel.Piece)
case pieceNotAllowedOnThisCell(piece: DouShouQiModel.Piece, cell: DouShouQiModel.Cell)
public static func == (a: DouShouQiModel.InvalidBoardError, b: DouShouQiModel.InvalidBoardError) -> Swift.Bool
}
public enum Owner {
case noOne, player1, player2
public var simpleDescription: Swift.String {
get
}
public static func == (a: DouShouQiModel.Owner, b: DouShouQiModel.Owner) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers public class IAPlayer : DouShouQiModel.Player {
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
@objc deinit
}
public struct Move : Swift.CustomStringConvertible, Swift.Equatable {
public let owner: DouShouQiModel.Owner
public let rowOrigin: Swift.Int
public let columnOrigin: Swift.Int
public let rowDestination: Swift.Int
public let columnDestination: Swift.Int
public init(of owner: DouShouQiModel.Owner, fromRow rowOrigin: Swift.Int, andFromColumn colOrigin: Swift.Int, toRow rowDest: Swift.Int, andToColumn colDest: Swift.Int)
public var description: Swift.String {
get
}
public static func == (a: DouShouQiModel.Move, b: DouShouQiModel.Move) -> Swift.Bool
}
public enum Animal : Swift.Int {
case rat, cat, dog, wolf, leopard, tiger, lion, elephant
public init?(rawValue: Swift.Int)
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
public class Game {
public var board: DouShouQiModel.Board {
get
}
public var rules: any DouShouQiModel.Rules {
get
}
final public let players: [DouShouQiModel.Owner : DouShouQiModel.Player]
public init(withRules rules: any DouShouQiModel.Rules, andPlayer1 player1: DouShouQiModel.Player, andPlayer2 player2: DouShouQiModel.Player) throws
public init(withBoard board: DouShouQiModel.Board, andRules rules: any DouShouQiModel.Rules, andPlayer1 player1: DouShouQiModel.Player, andPlayer2 player2: DouShouQiModel.Player) throws
public func addGameStartedListener(_ listener: @escaping (DouShouQiModel.Board) -> Swift.Void)
#if compiler(>=5.3) && $AsyncAwait
public func addPlayerNotifiedListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Player) async throws -> Swift.Void)
#endif
#if compiler(>=5.3) && $AsyncAwait
public func addGameChangedListener(_ listener: @escaping (DouShouQiModel.Game) async -> Swift.Void)
#endif
public func addGameOverListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Result, DouShouQiModel.Player?) -> Swift.Void)
public func addMoveChosenCallbacksListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Move, DouShouQiModel.Player) -> Swift.Void)
public func addInvalidMoveCallbacksListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Move, DouShouQiModel.Player, Swift.Bool) -> Swift.Void)
public func addBoardChangedListener(_ listener: @escaping (DouShouQiModel.Board) -> Swift.Void)
public func addPieceRemovedListener(_ listener: @escaping (Swift.Int, Swift.Int, DouShouQiModel.Piece) -> Swift.Void)
#if compiler(>=5.3) && $AsyncAwait
public func onPlayed(with move: DouShouQiModel.Move?, from player: DouShouQiModel.Player) async throws
#endif
public var isOver: Swift.Bool {
get
}
#if compiler(>=5.3) && $AsyncAwait
public func start() async throws
#endif
@objc deinit
}
extension DouShouQiModel.WinningReason : Swift.Equatable {}
extension DouShouQiModel.WinningReason : Swift.Hashable {}
extension DouShouQiModel.BoardFailingReason : Swift.Equatable {}
extension DouShouQiModel.BoardFailingReason : Swift.Hashable {}
extension DouShouQiModel.CellType : Swift.Equatable {}
extension DouShouQiModel.CellType : Swift.Hashable {}
extension DouShouQiModel.Owner : Swift.Equatable {}
extension DouShouQiModel.Owner : Swift.Hashable {}
extension DouShouQiModel.Animal : Swift.Equatable {}
extension DouShouQiModel.Animal : Swift.Hashable {}
extension DouShouQiModel.Animal : Swift.RawRepresentable {}

@ -1,11 +0,0 @@
framework module DouShouQiModel {
umbrella header "DouShouQiModel.h"
export *
module * { export * }
}
module DouShouQiModel.Swift {
header "DouShouQiModel-Swift.h"
requires objc
}

@ -1,245 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict>
<key>Headers/DouShouQiModel-Swift.h</key>
<data>
Ugz84k7Dtyq8c1kVv5knXzRL8M8=
</data>
<key>Headers/DouShouQiModel.h</key>
<data>
oRFeERlH0MoI6LrvagIzL3ni4lM=
</data>
<key>Info.plist</key>
<data>
nK7+MI/Ze6f+km/d+6SafK4UOHw=
</data>
<key>Modules/DouShouQiModel.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
<data>
5wlrw/S604f6EkkdO0sjydo0+Bc=
</data>
<key>Modules/DouShouQiModel.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
<data>
iWelfKfa40hASjZTv+0MmwJpt14=
</data>
<key>Modules/DouShouQiModel.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
<data>
uNDHcaRHf/ULIsVZEMiJY2HGm4c=
</data>
<key>Modules/DouShouQiModel.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
<data>
iWelfKfa40hASjZTv+0MmwJpt14=
</data>
<key>Modules/DouShouQiModel.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
<data>
hIkz8AGNOjj+boCk29AkmkNg7U4=
</data>
<key>Modules/DouShouQiModel.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
<data>
5wlrw/S604f6EkkdO0sjydo0+Bc=
</data>
<key>Modules/DouShouQiModel.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
<data>
ulNUxrIsFIWqKNx6spilb7IJVR0=
</data>
<key>Modules/DouShouQiModel.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
<data>
tkYnhquJQVCRsNSI7Hl83a7/uFk=
</data>
<key>Modules/DouShouQiModel.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
<data>
ulNUxrIsFIWqKNx6spilb7IJVR0=
</data>
<key>Modules/DouShouQiModel.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
<data>
0ZAcidlUuohX1myhyQosgBBZq1s=
</data>
<key>Modules/module.modulemap</key>
<data>
tOh1oseR3w5cW6xQIaaghrv9LlM=
</data>
</dict>
<key>files2</key>
<dict>
<key>Headers/DouShouQiModel-Swift.h</key>
<dict>
<key>hash2</key>
<data>
X8yw4Beas8gUjOV/b4G2i2nanoGnSlTcLKeBiIYLXRI=
</data>
</dict>
<key>Headers/DouShouQiModel.h</key>
<dict>
<key>hash2</key>
<data>
a0LOmZXPnWhpMKaBoW1IdxOGAzn4RhRBe32928+2jeU=
</data>
</dict>
<key>Modules/DouShouQiModel.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
<dict>
<key>hash2</key>
<data>
btM982otm47LMNIetdE5JR553fM9PjFPuS8AXm0+EpQ=
</data>
</dict>
<key>Modules/DouShouQiModel.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
<dict>
<key>hash2</key>
<data>
oe48ffKwbmJhKUMG/td3wfVID9DF4QgJz/dIPJweV5g=
</data>
</dict>
<key>Modules/DouShouQiModel.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
<dict>
<key>hash2</key>
<data>
cpfiPzUVsQ9nZcmz7k/CLhMlNAa3hCWAVPNrKBhrKls=
</data>
</dict>
<key>Modules/DouShouQiModel.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
<dict>
<key>hash2</key>
<data>
oe48ffKwbmJhKUMG/td3wfVID9DF4QgJz/dIPJweV5g=
</data>
</dict>
<key>Modules/DouShouQiModel.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
<dict>
<key>hash2</key>
<data>
q85NBK13clOQfgVFgVjmL6pWsskBEw+Z45xPFMxL1+E=
</data>
</dict>
<key>Modules/DouShouQiModel.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
<dict>
<key>hash2</key>
<data>
btM982otm47LMNIetdE5JR553fM9PjFPuS8AXm0+EpQ=
</data>
</dict>
<key>Modules/DouShouQiModel.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
<dict>
<key>hash2</key>
<data>
agKcCCqs9pHq1e94l4ouc5WojSYeRzzGkrHxkw9FZ8c=
</data>
</dict>
<key>Modules/DouShouQiModel.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
<dict>
<key>hash2</key>
<data>
SsJ/b3BHzQ9S5Wz5tzNZPeo8WQ4dX+hCQFo95fU45as=
</data>
</dict>
<key>Modules/DouShouQiModel.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
<dict>
<key>hash2</key>
<data>
agKcCCqs9pHq1e94l4ouc5WojSYeRzzGkrHxkw9FZ8c=
</data>
</dict>
<key>Modules/DouShouQiModel.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
<dict>
<key>hash2</key>
<data>
0C4f5rpOmGFG3B9PLb/e4rylk+OdtHUNKJ+aW1e+MCE=
</data>
</dict>
<key>Modules/module.modulemap</key>
<dict>
<key>hash2</key>
<data>
XJ885pOXSQHhlMUP6dyA/ER9+SP/HZ+IMImbB4k5+rI=
</data>
</dict>
</dict>
<key>rules</key>
<dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>

@ -1,618 +0,0 @@
#if 0
#elif defined(__arm64__) && __arm64__
// Generated by Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
#ifndef DOUSHOUQIMODEL_SWIFT_H
#define DOUSHOUQIMODEL_SWIFT_H
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
#if !defined(__has_include)
# define __has_include(x) 0
#endif
#if !defined(__has_attribute)
# define __has_attribute(x) 0
#endif
#if !defined(__has_feature)
# define __has_feature(x) 0
#endif
#if !defined(__has_warning)
# define __has_warning(x) 0
#endif
#if __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#if defined(__OBJC__)
#include <Foundation/Foundation.h>
#endif
#if defined(__cplusplus)
#include <cstdint>
#include <cstddef>
#include <cstdbool>
#include <cstring>
#include <stdlib.h>
#include <new>
#include <type_traits>
#else
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <string.h>
#endif
#if defined(__cplusplus)
#if defined(__arm64e__) && __has_include(<ptrauth.h>)
# include <ptrauth.h>
#else
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreserved-macro-identifier"
# ifndef __ptrauth_swift_value_witness_function_pointer
# define __ptrauth_swift_value_witness_function_pointer(x)
# endif
# ifndef __ptrauth_swift_class_method_pointer
# define __ptrauth_swift_class_method_pointer(x)
# endif
#pragma clang diagnostic pop
#endif
#endif
#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if __has_include(<uchar.h>)
# include <uchar.h>
# elif !defined(__cplusplus)
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#endif
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
# define SWIFT_CLASS_PROPERTY(...)
# endif
#endif
#if !defined(SWIFT_RUNTIME_NAME)
# if __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
# else
# define SWIFT_RUNTIME_NAME(X)
# endif
#endif
#if !defined(SWIFT_COMPILE_NAME)
# if __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
# else
# define SWIFT_COMPILE_NAME(X)
# endif
#endif
#if !defined(SWIFT_METHOD_FAMILY)
# if __has_attribute(objc_method_family)
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
# else
# define SWIFT_METHOD_FAMILY(X)
# endif
#endif
#if !defined(SWIFT_NOESCAPE)
# if __has_attribute(noescape)
# define SWIFT_NOESCAPE __attribute__((noescape))
# else
# define SWIFT_NOESCAPE
# endif
#endif
#if !defined(SWIFT_RELEASES_ARGUMENT)
# if __has_attribute(ns_consumed)
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
# else
# define SWIFT_RELEASES_ARGUMENT
# endif
#endif
#if !defined(SWIFT_WARN_UNUSED_RESULT)
# if __has_attribute(warn_unused_result)
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
# else
# define SWIFT_WARN_UNUSED_RESULT
# endif
#endif
#if !defined(SWIFT_NORETURN)
# if __has_attribute(noreturn)
# define SWIFT_NORETURN __attribute__((noreturn))
# else
# define SWIFT_NORETURN
# endif
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM_ATTR)
# if __has_attribute(enum_extensibility)
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
# else
# define SWIFT_ENUM_ATTR(_extensibility)
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# if __has_feature(generalized_swift_name)
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# else
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if !defined(SWIFT_DEPRECATED_OBJC)
# if __has_feature(attribute_diagnose_if_objc)
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
# else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
# endif
#endif
#if defined(__OBJC__)
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#endif
#if !defined(SWIFT_EXTERN)
# if defined(__cplusplus)
# define SWIFT_EXTERN extern "C"
# else
# define SWIFT_EXTERN extern
# endif
#endif
#if !defined(SWIFT_CALL)
# define SWIFT_CALL __attribute__((swiftcall))
#endif
#if !defined(SWIFT_INDIRECT_RESULT)
# define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result))
#endif
#if !defined(SWIFT_CONTEXT)
# define SWIFT_CONTEXT __attribute__((swift_context))
#endif
#if !defined(SWIFT_ERROR_RESULT)
# define SWIFT_ERROR_RESULT __attribute__((swift_error_result))
#endif
#if defined(__cplusplus)
# define SWIFT_NOEXCEPT noexcept
#else
# define SWIFT_NOEXCEPT
#endif
#if !defined(SWIFT_C_INLINE_THUNK)
# if __has_attribute(always_inline)
# if __has_attribute(nodebug)
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug))
# else
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline))
# endif
# else
# define SWIFT_C_INLINE_THUNK inline
# endif
#endif
#if defined(_WIN32)
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport)
#endif
#else
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
# define SWIFT_IMPORT_STDLIB_SYMBOL
#endif
#endif
#if defined(__OBJC__)
#if __has_feature(objc_modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
#endif
#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
# undef any
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="DouShouQiModel",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
#if defined(__OBJC__)
#endif
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#if defined(__cplusplus)
#endif
#pragma clang diagnostic pop
#endif
#elif defined(__x86_64__) && __x86_64__
// Generated by Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
#ifndef DOUSHOUQIMODEL_SWIFT_H
#define DOUSHOUQIMODEL_SWIFT_H
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
#if !defined(__has_include)
# define __has_include(x) 0
#endif
#if !defined(__has_attribute)
# define __has_attribute(x) 0
#endif
#if !defined(__has_feature)
# define __has_feature(x) 0
#endif
#if !defined(__has_warning)
# define __has_warning(x) 0
#endif
#if __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#if defined(__OBJC__)
#include <Foundation/Foundation.h>
#endif
#if defined(__cplusplus)
#include <cstdint>
#include <cstddef>
#include <cstdbool>
#include <cstring>
#include <stdlib.h>
#include <new>
#include <type_traits>
#else
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <string.h>
#endif
#if defined(__cplusplus)
#if defined(__arm64e__) && __has_include(<ptrauth.h>)
# include <ptrauth.h>
#else
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreserved-macro-identifier"
# ifndef __ptrauth_swift_value_witness_function_pointer
# define __ptrauth_swift_value_witness_function_pointer(x)
# endif
# ifndef __ptrauth_swift_class_method_pointer
# define __ptrauth_swift_class_method_pointer(x)
# endif
#pragma clang diagnostic pop
#endif
#endif
#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if __has_include(<uchar.h>)
# include <uchar.h>
# elif !defined(__cplusplus)
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#endif
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
# define SWIFT_CLASS_PROPERTY(...)
# endif
#endif
#if !defined(SWIFT_RUNTIME_NAME)
# if __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
# else
# define SWIFT_RUNTIME_NAME(X)
# endif
#endif
#if !defined(SWIFT_COMPILE_NAME)
# if __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
# else
# define SWIFT_COMPILE_NAME(X)
# endif
#endif
#if !defined(SWIFT_METHOD_FAMILY)
# if __has_attribute(objc_method_family)
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
# else
# define SWIFT_METHOD_FAMILY(X)
# endif
#endif
#if !defined(SWIFT_NOESCAPE)
# if __has_attribute(noescape)
# define SWIFT_NOESCAPE __attribute__((noescape))
# else
# define SWIFT_NOESCAPE
# endif
#endif
#if !defined(SWIFT_RELEASES_ARGUMENT)
# if __has_attribute(ns_consumed)
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
# else
# define SWIFT_RELEASES_ARGUMENT
# endif
#endif
#if !defined(SWIFT_WARN_UNUSED_RESULT)
# if __has_attribute(warn_unused_result)
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
# else
# define SWIFT_WARN_UNUSED_RESULT
# endif
#endif
#if !defined(SWIFT_NORETURN)
# if __has_attribute(noreturn)
# define SWIFT_NORETURN __attribute__((noreturn))
# else
# define SWIFT_NORETURN
# endif
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM_ATTR)
# if __has_attribute(enum_extensibility)
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
# else
# define SWIFT_ENUM_ATTR(_extensibility)
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# if __has_feature(generalized_swift_name)
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# else
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if !defined(SWIFT_DEPRECATED_OBJC)
# if __has_feature(attribute_diagnose_if_objc)
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
# else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
# endif
#endif
#if defined(__OBJC__)
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#endif
#if !defined(SWIFT_EXTERN)
# if defined(__cplusplus)
# define SWIFT_EXTERN extern "C"
# else
# define SWIFT_EXTERN extern
# endif
#endif
#if !defined(SWIFT_CALL)
# define SWIFT_CALL __attribute__((swiftcall))
#endif
#if !defined(SWIFT_INDIRECT_RESULT)
# define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result))
#endif
#if !defined(SWIFT_CONTEXT)
# define SWIFT_CONTEXT __attribute__((swift_context))
#endif
#if !defined(SWIFT_ERROR_RESULT)
# define SWIFT_ERROR_RESULT __attribute__((swift_error_result))
#endif
#if defined(__cplusplus)
# define SWIFT_NOEXCEPT noexcept
#else
# define SWIFT_NOEXCEPT
#endif
#if !defined(SWIFT_C_INLINE_THUNK)
# if __has_attribute(always_inline)
# if __has_attribute(nodebug)
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug))
# else
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline))
# endif
# else
# define SWIFT_C_INLINE_THUNK inline
# endif
#endif
#if defined(_WIN32)
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport)
#endif
#else
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
# define SWIFT_IMPORT_STDLIB_SYMBOL
#endif
#endif
#if defined(__OBJC__)
#if __has_feature(objc_modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
#endif
#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
# undef any
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="DouShouQiModel",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
#if defined(__OBJC__)
#endif
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#if defined(__cplusplus)
#endif
#pragma clang diagnostic pop
#endif
#else
#error unsupported Swift architecture
#endif

@ -1,18 +0,0 @@
//
// DouShouQiModel.h
// DouShouQiModel
//
// Created by Marc Chevaldonné on 14/05/2024.
//
#import <Foundation/Foundation.h>
//! Project version number for DouShouQiModel.
FOUNDATION_EXPORT double DouShouQiModelVersionNumber;
//! Project version string for DouShouQiModel.
FOUNDATION_EXPORT const unsigned char DouShouQiModelVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <DouShouQiModel/PublicHeader.h>

@ -1,266 +0,0 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
// swift-module-flags: -target arm64-apple-macos13.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name DouShouQiModel
// swift-module-flags-ignorable: -enable-bare-slash-regex
@_exported import DouShouQiModel
import Foundation
import Swift
import _Concurrency
import _StringProcessing
import _SwiftConcurrencyShims
public enum Result : Swift.Equatable {
case notFinished
case even
case winner(winner: DouShouQiModel.Owner, reason: DouShouQiModel.WinningReason)
public static func == (a: DouShouQiModel.Result, b: DouShouQiModel.Result) -> Swift.Bool
}
public enum WinningReason {
case denReached, noMorePieces, tooManyOccurences, noMovesLeft
public static func == (a: DouShouQiModel.WinningReason, b: DouShouQiModel.WinningReason) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public enum BoardResult : Swift.Equatable {
case unknown
case ok(piece: DouShouQiModel.Piece?)
case failed(reason: DouShouQiModel.BoardFailingReason)
public static func == (a: DouShouQiModel.BoardResult, b: DouShouQiModel.BoardResult) -> Swift.Bool
}
public enum BoardFailingReason {
case unknown, outOfBounds, cellNotEmpty, cellEmpty
public static func == (a: DouShouQiModel.BoardFailingReason, b: DouShouQiModel.BoardFailingReason) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers public class HumanPlayer : DouShouQiModel.Player {
public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner, andInputMethod input: @escaping (_ hp: DouShouQiModel.HumanPlayer) -> DouShouQiModel.Move?)
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
#if compiler(>=5.3) && $AsyncAwait
override public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
public func changeInput(input: @escaping (_ hp: DouShouQiModel.HumanPlayer) -> DouShouQiModel.Move?)
#if compiler(>=5.3) && $AsyncAwait
public func chooseMove(_ move: DouShouQiModel.Move?) async throws
#endif
@objc deinit
}
public struct ClassicRules : DouShouQiModel.Rules {
public static func createBoard() -> DouShouQiModel.Board
public static func checkBoard(_ board: DouShouQiModel.Board) throws
public init()
public init(occurences: [DouShouQiModel.Board : Swift.Int], historic: [DouShouQiModel.Move])
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
public func isMoveValid(onBoard board: DouShouQiModel.Board, fromRow originRow: Swift.Int, andFromColumn originColumn: Swift.Int, toRow destinationRow: Swift.Int, andToColumn destinationColumn: Swift.Int) -> Swift.Bool
public func isMoveValid(onBoard board: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
public func isGameOver(withBoard board: DouShouQiModel.Board, andLastRowPlayed lastRow: Swift.Int, andLastColumnPlayer lastColumn: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
public mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
public func getNextPlayer() -> DouShouQiModel.Owner
public var occurences: [DouShouQiModel.Board : Swift.Int] {
get
}
public var historic: [DouShouQiModel.Move] {
get
}
}
public struct Cell : Swift.CustomStringConvertible, Swift.Equatable {
public var description: Swift.String {
get
}
public let cellType: DouShouQiModel.CellType
public let initialOwner: DouShouQiModel.Owner
public var piece: DouShouQiModel.Piece?
public init(ofType cellType: DouShouQiModel.CellType, ownedBy initialOwner: DouShouQiModel.Owner = .noOne, withPiece piece: DouShouQiModel.Piece? = nil)
public static func == (a: DouShouQiModel.Cell, b: DouShouQiModel.Cell) -> Swift.Bool
}
public struct VerySimpleRules : DouShouQiModel.Rules {
public static func createBoard() -> DouShouQiModel.Board
public static func checkBoard(_ board: DouShouQiModel.Board) throws
public init()
public init(occurences: [DouShouQiModel.Board : Swift.Int], historic: [DouShouQiModel.Move])
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
public func isMoveValid(onBoard board: DouShouQiModel.Board, fromRow originRow: Swift.Int, andFromColumn originColumn: Swift.Int, toRow destinationRow: Swift.Int, andToColumn destinationColumn: Swift.Int) -> Swift.Bool
public func isMoveValid(onBoard board: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
public func isGameOver(withBoard board: DouShouQiModel.Board, andLastRowPlayed lastRow: Swift.Int, andLastColumnPlayer lastColumn: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
public mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
public func getNextPlayer() -> DouShouQiModel.Owner
public var occurences: [DouShouQiModel.Board : Swift.Int] {
get
}
public var historic: [DouShouQiModel.Move] {
get
}
}
public protocol Rules {
static func createBoard() -> DouShouQiModel.Board
static func checkBoard(_ board: DouShouQiModel.Board) throws
func getNextPlayer() -> DouShouQiModel.Owner
func getMoves(in board: DouShouQiModel.Board, of: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
func getMoves(in board: DouShouQiModel.Board, of: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
func isMoveValid(onBoard: DouShouQiModel.Board, fromRow: Swift.Int, andFromColumn: Swift.Int, toRow: Swift.Int, andToColumn: Swift.Int) -> Swift.Bool
func isMoveValid(onBoard: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
func isGameOver(withBoard: DouShouQiModel.Board, andLastRowPlayed: Swift.Int, andLastColumnPlayer: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
var occurences: [DouShouQiModel.Board : Swift.Int] { get }
var historic: [DouShouQiModel.Move] { get }
}
public class Player {
final public let name: Swift.String
final public let id: DouShouQiModel.Owner
public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
#if compiler(>=5.3) && $AsyncAwait
public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
#if compiler(>=5.3) && $AsyncAwait
public func addPlayedCallbacksListener(_ listener: @escaping (DouShouQiModel.Move?, DouShouQiModel.Player) async throws -> Swift.Void)
#endif
#if compiler(>=5.3) && $AsyncAwait
public func notifyPlayed(withMove move: DouShouQiModel.Move?, andPlayer player: DouShouQiModel.Player) async throws
#endif
@objc deinit
}
public enum GameError : Swift.Error {
case invalidMove, nextPlayerError, badPlayerId(message: Swift.String), invalidRules, invalidPlayer, invalidGame, invalidBoard
}
@_inheritsConvenienceInitializers public class RandomPlayer : DouShouQiModel.IAPlayer {
#if compiler(>=5.3) && $AsyncAwait
override public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
@objc deinit
}
public enum CellType : Swift.CaseIterable {
case unknown, jungle, water, trap, den
public static func == (a: DouShouQiModel.CellType, b: DouShouQiModel.CellType) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public typealias AllCases = [DouShouQiModel.CellType]
public static var allCases: [DouShouQiModel.CellType] {
get
}
public var hashValue: Swift.Int {
get
}
}
public struct Board : Swift.Hashable {
public func hash(into hasher: inout Swift.Hasher)
public let nbRows: Swift.Int
public let nbColumns: Swift.Int
public var grid: [[DouShouQiModel.Cell]] {
get
}
public init?(withGrid grid: [[DouShouQiModel.Cell]])
public func countPieces(of owner: DouShouQiModel.Owner) -> Swift.Int
public func countPieces() -> (nbOfPiecesOfPlayer1: Swift.Int, nbOfPiecesOfPlayer2: Swift.Int)
public mutating func insert(piece: DouShouQiModel.Piece, atRow row: Swift.Int, andColumn column: Swift.Int) -> DouShouQiModel.BoardResult
public mutating func removePiece(atRow row: Swift.Int, andColumn column: Swift.Int) -> DouShouQiModel.BoardResult
public static func == (a: DouShouQiModel.Board, b: DouShouQiModel.Board) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
}
public struct Piece : Swift.CustomStringConvertible, Swift.Hashable {
public var description: Swift.String {
get
}
public let owner: DouShouQiModel.Owner
public let animal: DouShouQiModel.Animal
public init(withOwner owner: DouShouQiModel.Owner, andAnimal animal: DouShouQiModel.Animal)
public func hash(into hasher: inout Swift.Hasher)
public static func == (a: DouShouQiModel.Piece, b: DouShouQiModel.Piece) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
}
public enum InvalidBoardError : Swift.Error, Swift.Equatable {
case unknownError
case badDimensions(nbRows: Swift.Int, nbColumns: Swift.Int)
case badCellType(cellType: DouShouQiModel.CellType, row: Swift.Int, column: Swift.Int)
case multipleOccurenceOfSamePiece(piece: DouShouQiModel.Piece)
case pieceWithNoOwner(piece: DouShouQiModel.Piece)
case pieceNotAllowedOnThisCell(piece: DouShouQiModel.Piece, cell: DouShouQiModel.Cell)
public static func == (a: DouShouQiModel.InvalidBoardError, b: DouShouQiModel.InvalidBoardError) -> Swift.Bool
}
public enum Owner {
case noOne, player1, player2
public var simpleDescription: Swift.String {
get
}
public static func == (a: DouShouQiModel.Owner, b: DouShouQiModel.Owner) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers public class IAPlayer : DouShouQiModel.Player {
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
@objc deinit
}
public struct Move : Swift.CustomStringConvertible, Swift.Equatable {
public let owner: DouShouQiModel.Owner
public let rowOrigin: Swift.Int
public let columnOrigin: Swift.Int
public let rowDestination: Swift.Int
public let columnDestination: Swift.Int
public init(of owner: DouShouQiModel.Owner, fromRow rowOrigin: Swift.Int, andFromColumn colOrigin: Swift.Int, toRow rowDest: Swift.Int, andToColumn colDest: Swift.Int)
public var description: Swift.String {
get
}
public static func == (a: DouShouQiModel.Move, b: DouShouQiModel.Move) -> Swift.Bool
}
public enum Animal : Swift.Int {
case rat, cat, dog, wolf, leopard, tiger, lion, elephant
public init?(rawValue: Swift.Int)
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
public class Game {
public var board: DouShouQiModel.Board {
get
}
public var rules: any DouShouQiModel.Rules {
get
}
final public let players: [DouShouQiModel.Owner : DouShouQiModel.Player]
public init(withRules rules: any DouShouQiModel.Rules, andPlayer1 player1: DouShouQiModel.Player, andPlayer2 player2: DouShouQiModel.Player) throws
public init(withBoard board: DouShouQiModel.Board, andRules rules: any DouShouQiModel.Rules, andPlayer1 player1: DouShouQiModel.Player, andPlayer2 player2: DouShouQiModel.Player) throws
public func addGameStartedListener(_ listener: @escaping (DouShouQiModel.Board) -> Swift.Void)
#if compiler(>=5.3) && $AsyncAwait
public func addPlayerNotifiedListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Player) async throws -> Swift.Void)
#endif
#if compiler(>=5.3) && $AsyncAwait
public func addGameChangedListener(_ listener: @escaping (DouShouQiModel.Game) async -> Swift.Void)
#endif
public func addGameOverListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Result, DouShouQiModel.Player?) -> Swift.Void)
public func addMoveChosenCallbacksListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Move, DouShouQiModel.Player) -> Swift.Void)
public func addInvalidMoveCallbacksListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Move, DouShouQiModel.Player, Swift.Bool) -> Swift.Void)
public func addBoardChangedListener(_ listener: @escaping (DouShouQiModel.Board) -> Swift.Void)
public func addPieceRemovedListener(_ listener: @escaping (Swift.Int, Swift.Int, DouShouQiModel.Piece) -> Swift.Void)
#if compiler(>=5.3) && $AsyncAwait
public func onPlayed(with move: DouShouQiModel.Move?, from player: DouShouQiModel.Player) async throws
#endif
public var isOver: Swift.Bool {
get
}
#if compiler(>=5.3) && $AsyncAwait
public func start() async throws
#endif
@objc deinit
}
extension DouShouQiModel.WinningReason : Swift.Equatable {}
extension DouShouQiModel.WinningReason : Swift.Hashable {}
extension DouShouQiModel.BoardFailingReason : Swift.Equatable {}
extension DouShouQiModel.BoardFailingReason : Swift.Hashable {}
extension DouShouQiModel.CellType : Swift.Equatable {}
extension DouShouQiModel.CellType : Swift.Hashable {}
extension DouShouQiModel.Owner : Swift.Equatable {}
extension DouShouQiModel.Owner : Swift.Hashable {}
extension DouShouQiModel.Animal : Swift.Equatable {}
extension DouShouQiModel.Animal : Swift.Hashable {}
extension DouShouQiModel.Animal : Swift.RawRepresentable {}

@ -1,266 +0,0 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
// swift-module-flags: -target arm64-apple-macos13.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name DouShouQiModel
// swift-module-flags-ignorable: -enable-bare-slash-regex
@_exported import DouShouQiModel
import Foundation
import Swift
import _Concurrency
import _StringProcessing
import _SwiftConcurrencyShims
public enum Result : Swift.Equatable {
case notFinished
case even
case winner(winner: DouShouQiModel.Owner, reason: DouShouQiModel.WinningReason)
public static func == (a: DouShouQiModel.Result, b: DouShouQiModel.Result) -> Swift.Bool
}
public enum WinningReason {
case denReached, noMorePieces, tooManyOccurences, noMovesLeft
public static func == (a: DouShouQiModel.WinningReason, b: DouShouQiModel.WinningReason) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public enum BoardResult : Swift.Equatable {
case unknown
case ok(piece: DouShouQiModel.Piece?)
case failed(reason: DouShouQiModel.BoardFailingReason)
public static func == (a: DouShouQiModel.BoardResult, b: DouShouQiModel.BoardResult) -> Swift.Bool
}
public enum BoardFailingReason {
case unknown, outOfBounds, cellNotEmpty, cellEmpty
public static func == (a: DouShouQiModel.BoardFailingReason, b: DouShouQiModel.BoardFailingReason) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers public class HumanPlayer : DouShouQiModel.Player {
public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner, andInputMethod input: @escaping (_ hp: DouShouQiModel.HumanPlayer) -> DouShouQiModel.Move?)
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
#if compiler(>=5.3) && $AsyncAwait
override public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
public func changeInput(input: @escaping (_ hp: DouShouQiModel.HumanPlayer) -> DouShouQiModel.Move?)
#if compiler(>=5.3) && $AsyncAwait
public func chooseMove(_ move: DouShouQiModel.Move?) async throws
#endif
@objc deinit
}
public struct ClassicRules : DouShouQiModel.Rules {
public static func createBoard() -> DouShouQiModel.Board
public static func checkBoard(_ board: DouShouQiModel.Board) throws
public init()
public init(occurences: [DouShouQiModel.Board : Swift.Int], historic: [DouShouQiModel.Move])
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
public func isMoveValid(onBoard board: DouShouQiModel.Board, fromRow originRow: Swift.Int, andFromColumn originColumn: Swift.Int, toRow destinationRow: Swift.Int, andToColumn destinationColumn: Swift.Int) -> Swift.Bool
public func isMoveValid(onBoard board: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
public func isGameOver(withBoard board: DouShouQiModel.Board, andLastRowPlayed lastRow: Swift.Int, andLastColumnPlayer lastColumn: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
public mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
public func getNextPlayer() -> DouShouQiModel.Owner
public var occurences: [DouShouQiModel.Board : Swift.Int] {
get
}
public var historic: [DouShouQiModel.Move] {
get
}
}
public struct Cell : Swift.CustomStringConvertible, Swift.Equatable {
public var description: Swift.String {
get
}
public let cellType: DouShouQiModel.CellType
public let initialOwner: DouShouQiModel.Owner
public var piece: DouShouQiModel.Piece?
public init(ofType cellType: DouShouQiModel.CellType, ownedBy initialOwner: DouShouQiModel.Owner = .noOne, withPiece piece: DouShouQiModel.Piece? = nil)
public static func == (a: DouShouQiModel.Cell, b: DouShouQiModel.Cell) -> Swift.Bool
}
public struct VerySimpleRules : DouShouQiModel.Rules {
public static func createBoard() -> DouShouQiModel.Board
public static func checkBoard(_ board: DouShouQiModel.Board) throws
public init()
public init(occurences: [DouShouQiModel.Board : Swift.Int], historic: [DouShouQiModel.Move])
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
public func isMoveValid(onBoard board: DouShouQiModel.Board, fromRow originRow: Swift.Int, andFromColumn originColumn: Swift.Int, toRow destinationRow: Swift.Int, andToColumn destinationColumn: Swift.Int) -> Swift.Bool
public func isMoveValid(onBoard board: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
public func isGameOver(withBoard board: DouShouQiModel.Board, andLastRowPlayed lastRow: Swift.Int, andLastColumnPlayer lastColumn: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
public mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
public func getNextPlayer() -> DouShouQiModel.Owner
public var occurences: [DouShouQiModel.Board : Swift.Int] {
get
}
public var historic: [DouShouQiModel.Move] {
get
}
}
public protocol Rules {
static func createBoard() -> DouShouQiModel.Board
static func checkBoard(_ board: DouShouQiModel.Board) throws
func getNextPlayer() -> DouShouQiModel.Owner
func getMoves(in board: DouShouQiModel.Board, of: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
func getMoves(in board: DouShouQiModel.Board, of: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
func isMoveValid(onBoard: DouShouQiModel.Board, fromRow: Swift.Int, andFromColumn: Swift.Int, toRow: Swift.Int, andToColumn: Swift.Int) -> Swift.Bool
func isMoveValid(onBoard: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
func isGameOver(withBoard: DouShouQiModel.Board, andLastRowPlayed: Swift.Int, andLastColumnPlayer: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
var occurences: [DouShouQiModel.Board : Swift.Int] { get }
var historic: [DouShouQiModel.Move] { get }
}
public class Player {
final public let name: Swift.String
final public let id: DouShouQiModel.Owner
public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
#if compiler(>=5.3) && $AsyncAwait
public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
#if compiler(>=5.3) && $AsyncAwait
public func addPlayedCallbacksListener(_ listener: @escaping (DouShouQiModel.Move?, DouShouQiModel.Player) async throws -> Swift.Void)
#endif
#if compiler(>=5.3) && $AsyncAwait
public func notifyPlayed(withMove move: DouShouQiModel.Move?, andPlayer player: DouShouQiModel.Player) async throws
#endif
@objc deinit
}
public enum GameError : Swift.Error {
case invalidMove, nextPlayerError, badPlayerId(message: Swift.String), invalidRules, invalidPlayer, invalidGame, invalidBoard
}
@_inheritsConvenienceInitializers public class RandomPlayer : DouShouQiModel.IAPlayer {
#if compiler(>=5.3) && $AsyncAwait
override public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
@objc deinit
}
public enum CellType : Swift.CaseIterable {
case unknown, jungle, water, trap, den
public static func == (a: DouShouQiModel.CellType, b: DouShouQiModel.CellType) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public typealias AllCases = [DouShouQiModel.CellType]
public static var allCases: [DouShouQiModel.CellType] {
get
}
public var hashValue: Swift.Int {
get
}
}
public struct Board : Swift.Hashable {
public func hash(into hasher: inout Swift.Hasher)
public let nbRows: Swift.Int
public let nbColumns: Swift.Int
public var grid: [[DouShouQiModel.Cell]] {
get
}
public init?(withGrid grid: [[DouShouQiModel.Cell]])
public func countPieces(of owner: DouShouQiModel.Owner) -> Swift.Int
public func countPieces() -> (nbOfPiecesOfPlayer1: Swift.Int, nbOfPiecesOfPlayer2: Swift.Int)
public mutating func insert(piece: DouShouQiModel.Piece, atRow row: Swift.Int, andColumn column: Swift.Int) -> DouShouQiModel.BoardResult
public mutating func removePiece(atRow row: Swift.Int, andColumn column: Swift.Int) -> DouShouQiModel.BoardResult
public static func == (a: DouShouQiModel.Board, b: DouShouQiModel.Board) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
}
public struct Piece : Swift.CustomStringConvertible, Swift.Hashable {
public var description: Swift.String {
get
}
public let owner: DouShouQiModel.Owner
public let animal: DouShouQiModel.Animal
public init(withOwner owner: DouShouQiModel.Owner, andAnimal animal: DouShouQiModel.Animal)
public func hash(into hasher: inout Swift.Hasher)
public static func == (a: DouShouQiModel.Piece, b: DouShouQiModel.Piece) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
}
public enum InvalidBoardError : Swift.Error, Swift.Equatable {
case unknownError
case badDimensions(nbRows: Swift.Int, nbColumns: Swift.Int)
case badCellType(cellType: DouShouQiModel.CellType, row: Swift.Int, column: Swift.Int)
case multipleOccurenceOfSamePiece(piece: DouShouQiModel.Piece)
case pieceWithNoOwner(piece: DouShouQiModel.Piece)
case pieceNotAllowedOnThisCell(piece: DouShouQiModel.Piece, cell: DouShouQiModel.Cell)
public static func == (a: DouShouQiModel.InvalidBoardError, b: DouShouQiModel.InvalidBoardError) -> Swift.Bool
}
public enum Owner {
case noOne, player1, player2
public var simpleDescription: Swift.String {
get
}
public static func == (a: DouShouQiModel.Owner, b: DouShouQiModel.Owner) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers public class IAPlayer : DouShouQiModel.Player {
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
@objc deinit
}
public struct Move : Swift.CustomStringConvertible, Swift.Equatable {
public let owner: DouShouQiModel.Owner
public let rowOrigin: Swift.Int
public let columnOrigin: Swift.Int
public let rowDestination: Swift.Int
public let columnDestination: Swift.Int
public init(of owner: DouShouQiModel.Owner, fromRow rowOrigin: Swift.Int, andFromColumn colOrigin: Swift.Int, toRow rowDest: Swift.Int, andToColumn colDest: Swift.Int)
public var description: Swift.String {
get
}
public static func == (a: DouShouQiModel.Move, b: DouShouQiModel.Move) -> Swift.Bool
}
public enum Animal : Swift.Int {
case rat, cat, dog, wolf, leopard, tiger, lion, elephant
public init?(rawValue: Swift.Int)
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
public class Game {
public var board: DouShouQiModel.Board {
get
}
public var rules: any DouShouQiModel.Rules {
get
}
final public let players: [DouShouQiModel.Owner : DouShouQiModel.Player]
public init(withRules rules: any DouShouQiModel.Rules, andPlayer1 player1: DouShouQiModel.Player, andPlayer2 player2: DouShouQiModel.Player) throws
public init(withBoard board: DouShouQiModel.Board, andRules rules: any DouShouQiModel.Rules, andPlayer1 player1: DouShouQiModel.Player, andPlayer2 player2: DouShouQiModel.Player) throws
public func addGameStartedListener(_ listener: @escaping (DouShouQiModel.Board) -> Swift.Void)
#if compiler(>=5.3) && $AsyncAwait
public func addPlayerNotifiedListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Player) async throws -> Swift.Void)
#endif
#if compiler(>=5.3) && $AsyncAwait
public func addGameChangedListener(_ listener: @escaping (DouShouQiModel.Game) async -> Swift.Void)
#endif
public func addGameOverListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Result, DouShouQiModel.Player?) -> Swift.Void)
public func addMoveChosenCallbacksListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Move, DouShouQiModel.Player) -> Swift.Void)
public func addInvalidMoveCallbacksListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Move, DouShouQiModel.Player, Swift.Bool) -> Swift.Void)
public func addBoardChangedListener(_ listener: @escaping (DouShouQiModel.Board) -> Swift.Void)
public func addPieceRemovedListener(_ listener: @escaping (Swift.Int, Swift.Int, DouShouQiModel.Piece) -> Swift.Void)
#if compiler(>=5.3) && $AsyncAwait
public func onPlayed(with move: DouShouQiModel.Move?, from player: DouShouQiModel.Player) async throws
#endif
public var isOver: Swift.Bool {
get
}
#if compiler(>=5.3) && $AsyncAwait
public func start() async throws
#endif
@objc deinit
}
extension DouShouQiModel.WinningReason : Swift.Equatable {}
extension DouShouQiModel.WinningReason : Swift.Hashable {}
extension DouShouQiModel.BoardFailingReason : Swift.Equatable {}
extension DouShouQiModel.BoardFailingReason : Swift.Hashable {}
extension DouShouQiModel.CellType : Swift.Equatable {}
extension DouShouQiModel.CellType : Swift.Hashable {}
extension DouShouQiModel.Owner : Swift.Equatable {}
extension DouShouQiModel.Owner : Swift.Hashable {}
extension DouShouQiModel.Animal : Swift.Equatable {}
extension DouShouQiModel.Animal : Swift.Hashable {}
extension DouShouQiModel.Animal : Swift.RawRepresentable {}

@ -1,266 +0,0 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
// swift-module-flags: -target x86_64-apple-macos13.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name DouShouQiModel
// swift-module-flags-ignorable: -enable-bare-slash-regex
@_exported import DouShouQiModel
import Foundation
import Swift
import _Concurrency
import _StringProcessing
import _SwiftConcurrencyShims
public enum Result : Swift.Equatable {
case notFinished
case even
case winner(winner: DouShouQiModel.Owner, reason: DouShouQiModel.WinningReason)
public static func == (a: DouShouQiModel.Result, b: DouShouQiModel.Result) -> Swift.Bool
}
public enum WinningReason {
case denReached, noMorePieces, tooManyOccurences, noMovesLeft
public static func == (a: DouShouQiModel.WinningReason, b: DouShouQiModel.WinningReason) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public enum BoardResult : Swift.Equatable {
case unknown
case ok(piece: DouShouQiModel.Piece?)
case failed(reason: DouShouQiModel.BoardFailingReason)
public static func == (a: DouShouQiModel.BoardResult, b: DouShouQiModel.BoardResult) -> Swift.Bool
}
public enum BoardFailingReason {
case unknown, outOfBounds, cellNotEmpty, cellEmpty
public static func == (a: DouShouQiModel.BoardFailingReason, b: DouShouQiModel.BoardFailingReason) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers public class HumanPlayer : DouShouQiModel.Player {
public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner, andInputMethod input: @escaping (_ hp: DouShouQiModel.HumanPlayer) -> DouShouQiModel.Move?)
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
#if compiler(>=5.3) && $AsyncAwait
override public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
public func changeInput(input: @escaping (_ hp: DouShouQiModel.HumanPlayer) -> DouShouQiModel.Move?)
#if compiler(>=5.3) && $AsyncAwait
public func chooseMove(_ move: DouShouQiModel.Move?) async throws
#endif
@objc deinit
}
public struct ClassicRules : DouShouQiModel.Rules {
public static func createBoard() -> DouShouQiModel.Board
public static func checkBoard(_ board: DouShouQiModel.Board) throws
public init()
public init(occurences: [DouShouQiModel.Board : Swift.Int], historic: [DouShouQiModel.Move])
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
public func isMoveValid(onBoard board: DouShouQiModel.Board, fromRow originRow: Swift.Int, andFromColumn originColumn: Swift.Int, toRow destinationRow: Swift.Int, andToColumn destinationColumn: Swift.Int) -> Swift.Bool
public func isMoveValid(onBoard board: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
public func isGameOver(withBoard board: DouShouQiModel.Board, andLastRowPlayed lastRow: Swift.Int, andLastColumnPlayer lastColumn: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
public mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
public func getNextPlayer() -> DouShouQiModel.Owner
public var occurences: [DouShouQiModel.Board : Swift.Int] {
get
}
public var historic: [DouShouQiModel.Move] {
get
}
}
public struct Cell : Swift.CustomStringConvertible, Swift.Equatable {
public var description: Swift.String {
get
}
public let cellType: DouShouQiModel.CellType
public let initialOwner: DouShouQiModel.Owner
public var piece: DouShouQiModel.Piece?
public init(ofType cellType: DouShouQiModel.CellType, ownedBy initialOwner: DouShouQiModel.Owner = .noOne, withPiece piece: DouShouQiModel.Piece? = nil)
public static func == (a: DouShouQiModel.Cell, b: DouShouQiModel.Cell) -> Swift.Bool
}
public struct VerySimpleRules : DouShouQiModel.Rules {
public static func createBoard() -> DouShouQiModel.Board
public static func checkBoard(_ board: DouShouQiModel.Board) throws
public init()
public init(occurences: [DouShouQiModel.Board : Swift.Int], historic: [DouShouQiModel.Move])
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
public func isMoveValid(onBoard board: DouShouQiModel.Board, fromRow originRow: Swift.Int, andFromColumn originColumn: Swift.Int, toRow destinationRow: Swift.Int, andToColumn destinationColumn: Swift.Int) -> Swift.Bool
public func isMoveValid(onBoard board: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
public func isGameOver(withBoard board: DouShouQiModel.Board, andLastRowPlayed lastRow: Swift.Int, andLastColumnPlayer lastColumn: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
public mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
public func getNextPlayer() -> DouShouQiModel.Owner
public var occurences: [DouShouQiModel.Board : Swift.Int] {
get
}
public var historic: [DouShouQiModel.Move] {
get
}
}
public protocol Rules {
static func createBoard() -> DouShouQiModel.Board
static func checkBoard(_ board: DouShouQiModel.Board) throws
func getNextPlayer() -> DouShouQiModel.Owner
func getMoves(in board: DouShouQiModel.Board, of: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
func getMoves(in board: DouShouQiModel.Board, of: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
func isMoveValid(onBoard: DouShouQiModel.Board, fromRow: Swift.Int, andFromColumn: Swift.Int, toRow: Swift.Int, andToColumn: Swift.Int) -> Swift.Bool
func isMoveValid(onBoard: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
func isGameOver(withBoard: DouShouQiModel.Board, andLastRowPlayed: Swift.Int, andLastColumnPlayer: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
var occurences: [DouShouQiModel.Board : Swift.Int] { get }
var historic: [DouShouQiModel.Move] { get }
}
public class Player {
final public let name: Swift.String
final public let id: DouShouQiModel.Owner
public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
#if compiler(>=5.3) && $AsyncAwait
public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
#if compiler(>=5.3) && $AsyncAwait
public func addPlayedCallbacksListener(_ listener: @escaping (DouShouQiModel.Move?, DouShouQiModel.Player) async throws -> Swift.Void)
#endif
#if compiler(>=5.3) && $AsyncAwait
public func notifyPlayed(withMove move: DouShouQiModel.Move?, andPlayer player: DouShouQiModel.Player) async throws
#endif
@objc deinit
}
public enum GameError : Swift.Error {
case invalidMove, nextPlayerError, badPlayerId(message: Swift.String), invalidRules, invalidPlayer, invalidGame, invalidBoard
}
@_inheritsConvenienceInitializers public class RandomPlayer : DouShouQiModel.IAPlayer {
#if compiler(>=5.3) && $AsyncAwait
override public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
@objc deinit
}
public enum CellType : Swift.CaseIterable {
case unknown, jungle, water, trap, den
public static func == (a: DouShouQiModel.CellType, b: DouShouQiModel.CellType) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public typealias AllCases = [DouShouQiModel.CellType]
public static var allCases: [DouShouQiModel.CellType] {
get
}
public var hashValue: Swift.Int {
get
}
}
public struct Board : Swift.Hashable {
public func hash(into hasher: inout Swift.Hasher)
public let nbRows: Swift.Int
public let nbColumns: Swift.Int
public var grid: [[DouShouQiModel.Cell]] {
get
}
public init?(withGrid grid: [[DouShouQiModel.Cell]])
public func countPieces(of owner: DouShouQiModel.Owner) -> Swift.Int
public func countPieces() -> (nbOfPiecesOfPlayer1: Swift.Int, nbOfPiecesOfPlayer2: Swift.Int)
public mutating func insert(piece: DouShouQiModel.Piece, atRow row: Swift.Int, andColumn column: Swift.Int) -> DouShouQiModel.BoardResult
public mutating func removePiece(atRow row: Swift.Int, andColumn column: Swift.Int) -> DouShouQiModel.BoardResult
public static func == (a: DouShouQiModel.Board, b: DouShouQiModel.Board) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
}
public struct Piece : Swift.CustomStringConvertible, Swift.Hashable {
public var description: Swift.String {
get
}
public let owner: DouShouQiModel.Owner
public let animal: DouShouQiModel.Animal
public init(withOwner owner: DouShouQiModel.Owner, andAnimal animal: DouShouQiModel.Animal)
public func hash(into hasher: inout Swift.Hasher)
public static func == (a: DouShouQiModel.Piece, b: DouShouQiModel.Piece) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
}
public enum InvalidBoardError : Swift.Error, Swift.Equatable {
case unknownError
case badDimensions(nbRows: Swift.Int, nbColumns: Swift.Int)
case badCellType(cellType: DouShouQiModel.CellType, row: Swift.Int, column: Swift.Int)
case multipleOccurenceOfSamePiece(piece: DouShouQiModel.Piece)
case pieceWithNoOwner(piece: DouShouQiModel.Piece)
case pieceNotAllowedOnThisCell(piece: DouShouQiModel.Piece, cell: DouShouQiModel.Cell)
public static func == (a: DouShouQiModel.InvalidBoardError, b: DouShouQiModel.InvalidBoardError) -> Swift.Bool
}
public enum Owner {
case noOne, player1, player2
public var simpleDescription: Swift.String {
get
}
public static func == (a: DouShouQiModel.Owner, b: DouShouQiModel.Owner) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers public class IAPlayer : DouShouQiModel.Player {
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
@objc deinit
}
public struct Move : Swift.CustomStringConvertible, Swift.Equatable {
public let owner: DouShouQiModel.Owner
public let rowOrigin: Swift.Int
public let columnOrigin: Swift.Int
public let rowDestination: Swift.Int
public let columnDestination: Swift.Int
public init(of owner: DouShouQiModel.Owner, fromRow rowOrigin: Swift.Int, andFromColumn colOrigin: Swift.Int, toRow rowDest: Swift.Int, andToColumn colDest: Swift.Int)
public var description: Swift.String {
get
}
public static func == (a: DouShouQiModel.Move, b: DouShouQiModel.Move) -> Swift.Bool
}
public enum Animal : Swift.Int {
case rat, cat, dog, wolf, leopard, tiger, lion, elephant
public init?(rawValue: Swift.Int)
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
public class Game {
public var board: DouShouQiModel.Board {
get
}
public var rules: any DouShouQiModel.Rules {
get
}
final public let players: [DouShouQiModel.Owner : DouShouQiModel.Player]
public init(withRules rules: any DouShouQiModel.Rules, andPlayer1 player1: DouShouQiModel.Player, andPlayer2 player2: DouShouQiModel.Player) throws
public init(withBoard board: DouShouQiModel.Board, andRules rules: any DouShouQiModel.Rules, andPlayer1 player1: DouShouQiModel.Player, andPlayer2 player2: DouShouQiModel.Player) throws
public func addGameStartedListener(_ listener: @escaping (DouShouQiModel.Board) -> Swift.Void)
#if compiler(>=5.3) && $AsyncAwait
public func addPlayerNotifiedListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Player) async throws -> Swift.Void)
#endif
#if compiler(>=5.3) && $AsyncAwait
public func addGameChangedListener(_ listener: @escaping (DouShouQiModel.Game) async -> Swift.Void)
#endif
public func addGameOverListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Result, DouShouQiModel.Player?) -> Swift.Void)
public func addMoveChosenCallbacksListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Move, DouShouQiModel.Player) -> Swift.Void)
public func addInvalidMoveCallbacksListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Move, DouShouQiModel.Player, Swift.Bool) -> Swift.Void)
public func addBoardChangedListener(_ listener: @escaping (DouShouQiModel.Board) -> Swift.Void)
public func addPieceRemovedListener(_ listener: @escaping (Swift.Int, Swift.Int, DouShouQiModel.Piece) -> Swift.Void)
#if compiler(>=5.3) && $AsyncAwait
public func onPlayed(with move: DouShouQiModel.Move?, from player: DouShouQiModel.Player) async throws
#endif
public var isOver: Swift.Bool {
get
}
#if compiler(>=5.3) && $AsyncAwait
public func start() async throws
#endif
@objc deinit
}
extension DouShouQiModel.WinningReason : Swift.Equatable {}
extension DouShouQiModel.WinningReason : Swift.Hashable {}
extension DouShouQiModel.BoardFailingReason : Swift.Equatable {}
extension DouShouQiModel.BoardFailingReason : Swift.Hashable {}
extension DouShouQiModel.CellType : Swift.Equatable {}
extension DouShouQiModel.CellType : Swift.Hashable {}
extension DouShouQiModel.Owner : Swift.Equatable {}
extension DouShouQiModel.Owner : Swift.Hashable {}
extension DouShouQiModel.Animal : Swift.Equatable {}
extension DouShouQiModel.Animal : Swift.Hashable {}
extension DouShouQiModel.Animal : Swift.RawRepresentable {}

@ -1,266 +0,0 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
// swift-module-flags: -target x86_64-apple-macos13.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name DouShouQiModel
// swift-module-flags-ignorable: -enable-bare-slash-regex
@_exported import DouShouQiModel
import Foundation
import Swift
import _Concurrency
import _StringProcessing
import _SwiftConcurrencyShims
public enum Result : Swift.Equatable {
case notFinished
case even
case winner(winner: DouShouQiModel.Owner, reason: DouShouQiModel.WinningReason)
public static func == (a: DouShouQiModel.Result, b: DouShouQiModel.Result) -> Swift.Bool
}
public enum WinningReason {
case denReached, noMorePieces, tooManyOccurences, noMovesLeft
public static func == (a: DouShouQiModel.WinningReason, b: DouShouQiModel.WinningReason) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public enum BoardResult : Swift.Equatable {
case unknown
case ok(piece: DouShouQiModel.Piece?)
case failed(reason: DouShouQiModel.BoardFailingReason)
public static func == (a: DouShouQiModel.BoardResult, b: DouShouQiModel.BoardResult) -> Swift.Bool
}
public enum BoardFailingReason {
case unknown, outOfBounds, cellNotEmpty, cellEmpty
public static func == (a: DouShouQiModel.BoardFailingReason, b: DouShouQiModel.BoardFailingReason) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers public class HumanPlayer : DouShouQiModel.Player {
public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner, andInputMethod input: @escaping (_ hp: DouShouQiModel.HumanPlayer) -> DouShouQiModel.Move?)
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
#if compiler(>=5.3) && $AsyncAwait
override public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
public func changeInput(input: @escaping (_ hp: DouShouQiModel.HumanPlayer) -> DouShouQiModel.Move?)
#if compiler(>=5.3) && $AsyncAwait
public func chooseMove(_ move: DouShouQiModel.Move?) async throws
#endif
@objc deinit
}
public struct ClassicRules : DouShouQiModel.Rules {
public static func createBoard() -> DouShouQiModel.Board
public static func checkBoard(_ board: DouShouQiModel.Board) throws
public init()
public init(occurences: [DouShouQiModel.Board : Swift.Int], historic: [DouShouQiModel.Move])
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
public func isMoveValid(onBoard board: DouShouQiModel.Board, fromRow originRow: Swift.Int, andFromColumn originColumn: Swift.Int, toRow destinationRow: Swift.Int, andToColumn destinationColumn: Swift.Int) -> Swift.Bool
public func isMoveValid(onBoard board: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
public func isGameOver(withBoard board: DouShouQiModel.Board, andLastRowPlayed lastRow: Swift.Int, andLastColumnPlayer lastColumn: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
public mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
public func getNextPlayer() -> DouShouQiModel.Owner
public var occurences: [DouShouQiModel.Board : Swift.Int] {
get
}
public var historic: [DouShouQiModel.Move] {
get
}
}
public struct Cell : Swift.CustomStringConvertible, Swift.Equatable {
public var description: Swift.String {
get
}
public let cellType: DouShouQiModel.CellType
public let initialOwner: DouShouQiModel.Owner
public var piece: DouShouQiModel.Piece?
public init(ofType cellType: DouShouQiModel.CellType, ownedBy initialOwner: DouShouQiModel.Owner = .noOne, withPiece piece: DouShouQiModel.Piece? = nil)
public static func == (a: DouShouQiModel.Cell, b: DouShouQiModel.Cell) -> Swift.Bool
}
public struct VerySimpleRules : DouShouQiModel.Rules {
public static func createBoard() -> DouShouQiModel.Board
public static func checkBoard(_ board: DouShouQiModel.Board) throws
public init()
public init(occurences: [DouShouQiModel.Board : Swift.Int], historic: [DouShouQiModel.Move])
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
public func getMoves(in board: DouShouQiModel.Board, of owner: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
public func isMoveValid(onBoard board: DouShouQiModel.Board, fromRow originRow: Swift.Int, andFromColumn originColumn: Swift.Int, toRow destinationRow: Swift.Int, andToColumn destinationColumn: Swift.Int) -> Swift.Bool
public func isMoveValid(onBoard board: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
public func isGameOver(withBoard board: DouShouQiModel.Board, andLastRowPlayed lastRow: Swift.Int, andLastColumnPlayer lastColumn: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
public mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
public func getNextPlayer() -> DouShouQiModel.Owner
public var occurences: [DouShouQiModel.Board : Swift.Int] {
get
}
public var historic: [DouShouQiModel.Move] {
get
}
}
public protocol Rules {
static func createBoard() -> DouShouQiModel.Board
static func checkBoard(_ board: DouShouQiModel.Board) throws
func getNextPlayer() -> DouShouQiModel.Owner
func getMoves(in board: DouShouQiModel.Board, of: DouShouQiModel.Owner) -> [DouShouQiModel.Move]
func getMoves(in board: DouShouQiModel.Board, of: DouShouQiModel.Owner, fromRow row: Swift.Int, andColumn col: Swift.Int) -> [DouShouQiModel.Move]
func isMoveValid(onBoard: DouShouQiModel.Board, fromRow: Swift.Int, andFromColumn: Swift.Int, toRow: Swift.Int, andToColumn: Swift.Int) -> Swift.Bool
func isMoveValid(onBoard: DouShouQiModel.Board, withMove move: DouShouQiModel.Move) -> Swift.Bool
func isGameOver(withBoard: DouShouQiModel.Board, andLastRowPlayed: Swift.Int, andLastColumnPlayer: Swift.Int) -> (Swift.Bool, DouShouQiModel.Result)
mutating func playedMove(_ move: DouShouQiModel.Move, onStartingBoard board: DouShouQiModel.Board, andResultingBoard resultingBoard: DouShouQiModel.Board) throws
var occurences: [DouShouQiModel.Board : Swift.Int] { get }
var historic: [DouShouQiModel.Move] { get }
}
public class Player {
final public let name: Swift.String
final public let id: DouShouQiModel.Owner
public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
#if compiler(>=5.3) && $AsyncAwait
public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
#if compiler(>=5.3) && $AsyncAwait
public func addPlayedCallbacksListener(_ listener: @escaping (DouShouQiModel.Move?, DouShouQiModel.Player) async throws -> Swift.Void)
#endif
#if compiler(>=5.3) && $AsyncAwait
public func notifyPlayed(withMove move: DouShouQiModel.Move?, andPlayer player: DouShouQiModel.Player) async throws
#endif
@objc deinit
}
public enum GameError : Swift.Error {
case invalidMove, nextPlayerError, badPlayerId(message: Swift.String), invalidRules, invalidPlayer, invalidGame, invalidBoard
}
@_inheritsConvenienceInitializers public class RandomPlayer : DouShouQiModel.IAPlayer {
#if compiler(>=5.3) && $AsyncAwait
override public func chooseMove(in board: DouShouQiModel.Board, with rules: any DouShouQiModel.Rules) async throws
#endif
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
@objc deinit
}
public enum CellType : Swift.CaseIterable {
case unknown, jungle, water, trap, den
public static func == (a: DouShouQiModel.CellType, b: DouShouQiModel.CellType) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public typealias AllCases = [DouShouQiModel.CellType]
public static var allCases: [DouShouQiModel.CellType] {
get
}
public var hashValue: Swift.Int {
get
}
}
public struct Board : Swift.Hashable {
public func hash(into hasher: inout Swift.Hasher)
public let nbRows: Swift.Int
public let nbColumns: Swift.Int
public var grid: [[DouShouQiModel.Cell]] {
get
}
public init?(withGrid grid: [[DouShouQiModel.Cell]])
public func countPieces(of owner: DouShouQiModel.Owner) -> Swift.Int
public func countPieces() -> (nbOfPiecesOfPlayer1: Swift.Int, nbOfPiecesOfPlayer2: Swift.Int)
public mutating func insert(piece: DouShouQiModel.Piece, atRow row: Swift.Int, andColumn column: Swift.Int) -> DouShouQiModel.BoardResult
public mutating func removePiece(atRow row: Swift.Int, andColumn column: Swift.Int) -> DouShouQiModel.BoardResult
public static func == (a: DouShouQiModel.Board, b: DouShouQiModel.Board) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
}
public struct Piece : Swift.CustomStringConvertible, Swift.Hashable {
public var description: Swift.String {
get
}
public let owner: DouShouQiModel.Owner
public let animal: DouShouQiModel.Animal
public init(withOwner owner: DouShouQiModel.Owner, andAnimal animal: DouShouQiModel.Animal)
public func hash(into hasher: inout Swift.Hasher)
public static func == (a: DouShouQiModel.Piece, b: DouShouQiModel.Piece) -> Swift.Bool
public var hashValue: Swift.Int {
get
}
}
public enum InvalidBoardError : Swift.Error, Swift.Equatable {
case unknownError
case badDimensions(nbRows: Swift.Int, nbColumns: Swift.Int)
case badCellType(cellType: DouShouQiModel.CellType, row: Swift.Int, column: Swift.Int)
case multipleOccurenceOfSamePiece(piece: DouShouQiModel.Piece)
case pieceWithNoOwner(piece: DouShouQiModel.Piece)
case pieceNotAllowedOnThisCell(piece: DouShouQiModel.Piece, cell: DouShouQiModel.Cell)
public static func == (a: DouShouQiModel.InvalidBoardError, b: DouShouQiModel.InvalidBoardError) -> Swift.Bool
}
public enum Owner {
case noOne, player1, player2
public var simpleDescription: Swift.String {
get
}
public static func == (a: DouShouQiModel.Owner, b: DouShouQiModel.Owner) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers public class IAPlayer : DouShouQiModel.Player {
override public init?(withName name: Swift.String, andId id: DouShouQiModel.Owner)
@objc deinit
}
public struct Move : Swift.CustomStringConvertible, Swift.Equatable {
public let owner: DouShouQiModel.Owner
public let rowOrigin: Swift.Int
public let columnOrigin: Swift.Int
public let rowDestination: Swift.Int
public let columnDestination: Swift.Int
public init(of owner: DouShouQiModel.Owner, fromRow rowOrigin: Swift.Int, andFromColumn colOrigin: Swift.Int, toRow rowDest: Swift.Int, andToColumn colDest: Swift.Int)
public var description: Swift.String {
get
}
public static func == (a: DouShouQiModel.Move, b: DouShouQiModel.Move) -> Swift.Bool
}
public enum Animal : Swift.Int {
case rat, cat, dog, wolf, leopard, tiger, lion, elephant
public init?(rawValue: Swift.Int)
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
public class Game {
public var board: DouShouQiModel.Board {
get
}
public var rules: any DouShouQiModel.Rules {
get
}
final public let players: [DouShouQiModel.Owner : DouShouQiModel.Player]
public init(withRules rules: any DouShouQiModel.Rules, andPlayer1 player1: DouShouQiModel.Player, andPlayer2 player2: DouShouQiModel.Player) throws
public init(withBoard board: DouShouQiModel.Board, andRules rules: any DouShouQiModel.Rules, andPlayer1 player1: DouShouQiModel.Player, andPlayer2 player2: DouShouQiModel.Player) throws
public func addGameStartedListener(_ listener: @escaping (DouShouQiModel.Board) -> Swift.Void)
#if compiler(>=5.3) && $AsyncAwait
public func addPlayerNotifiedListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Player) async throws -> Swift.Void)
#endif
#if compiler(>=5.3) && $AsyncAwait
public func addGameChangedListener(_ listener: @escaping (DouShouQiModel.Game) async -> Swift.Void)
#endif
public func addGameOverListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Result, DouShouQiModel.Player?) -> Swift.Void)
public func addMoveChosenCallbacksListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Move, DouShouQiModel.Player) -> Swift.Void)
public func addInvalidMoveCallbacksListener(_ listener: @escaping (DouShouQiModel.Board, DouShouQiModel.Move, DouShouQiModel.Player, Swift.Bool) -> Swift.Void)
public func addBoardChangedListener(_ listener: @escaping (DouShouQiModel.Board) -> Swift.Void)
public func addPieceRemovedListener(_ listener: @escaping (Swift.Int, Swift.Int, DouShouQiModel.Piece) -> Swift.Void)
#if compiler(>=5.3) && $AsyncAwait
public func onPlayed(with move: DouShouQiModel.Move?, from player: DouShouQiModel.Player) async throws
#endif
public var isOver: Swift.Bool {
get
}
#if compiler(>=5.3) && $AsyncAwait
public func start() async throws
#endif
@objc deinit
}
extension DouShouQiModel.WinningReason : Swift.Equatable {}
extension DouShouQiModel.WinningReason : Swift.Hashable {}
extension DouShouQiModel.BoardFailingReason : Swift.Equatable {}
extension DouShouQiModel.BoardFailingReason : Swift.Hashable {}
extension DouShouQiModel.CellType : Swift.Equatable {}
extension DouShouQiModel.CellType : Swift.Hashable {}
extension DouShouQiModel.Owner : Swift.Equatable {}
extension DouShouQiModel.Owner : Swift.Hashable {}
extension DouShouQiModel.Animal : Swift.Equatable {}
extension DouShouQiModel.Animal : Swift.Hashable {}
extension DouShouQiModel.Animal : Swift.RawRepresentable {}

@ -1,11 +0,0 @@
framework module DouShouQiModel {
umbrella header "DouShouQiModel.h"
export *
module * { export * }
}
module DouShouQiModel.Swift {
header "DouShouQiModel-Swift.h"
requires objc
}

@ -1,46 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>23E224</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>DouShouQiModel</string>
<key>CFBundleIdentifier</key>
<string>fr.uca.iut.DouShouQiModel</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>DouShouQiModel</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string></string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>14.2</string>
<key>DTSDKBuild</key>
<string>23C53</string>
<key>DTSDKName</key>
<string>macosx14.2</string>
<key>DTXcode</key>
<string>1520</string>
<key>DTXcodeBuild</key>
<string>15C500b</string>
<key>LSMinimumSystemVersion</key>
<string>13.0</string>
</dict>
</plist>

@ -7,6 +7,7 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
6437FF132C25846F009D0EAF /* PlayingGameVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6437FF122C25846F009D0EAF /* PlayingGameVM.swift */; };
6458345C2BF5F92300E18321 /* DouShouQi_AppApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6458345B2BF5F92300E18321 /* DouShouQi_AppApp.swift */; }; 6458345C2BF5F92300E18321 /* DouShouQi_AppApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6458345B2BF5F92300E18321 /* DouShouQi_AppApp.swift */; };
6458345E2BF5F92300E18321 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6458345D2BF5F92300E18321 /* ContentView.swift */; }; 6458345E2BF5F92300E18321 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6458345D2BF5F92300E18321 /* ContentView.swift */; };
645834602BF5F92500E18321 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6458345F2BF5F92500E18321 /* Assets.xcassets */; }; 645834602BF5F92500E18321 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6458345F2BF5F92500E18321 /* Assets.xcassets */; };
@ -16,6 +17,10 @@
645834792BF5F92600E18321 /* DouShouQi_AppUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 645834782BF5F92600E18321 /* DouShouQi_AppUITestsLaunchTests.swift */; }; 645834792BF5F92600E18321 /* DouShouQi_AppUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 645834782BF5F92600E18321 /* DouShouQi_AppUITestsLaunchTests.swift */; };
645B4C202BFCCA0500FD658A /* PlayerScoreResumeFrame.swift in Sources */ = {isa = PBXBuildFile; fileRef = 645B4C1F2BFCCA0500FD658A /* PlayerScoreResumeFrame.swift */; }; 645B4C202BFCCA0500FD658A /* PlayerScoreResumeFrame.swift in Sources */ = {isa = PBXBuildFile; fileRef = 645B4C1F2BFCCA0500FD658A /* PlayerScoreResumeFrame.swift */; };
645B4C252BFCD3C600FD658A /* ScoreBoardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 645B4C242BFCD3C600FD658A /* ScoreBoardView.swift */; }; 645B4C252BFCD3C600FD658A /* ScoreBoardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 645B4C242BFCD3C600FD658A /* ScoreBoardView.swift */; };
646F04BE2C0F54C0003C8600 /* SettingsVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 646F04BD2C0F54C0003C8600 /* SettingsVM.swift */; };
646F04C12C0F5C11003C8600 /* Language.swift in Sources */ = {isa = PBXBuildFile; fileRef = 646F04C02C0F5C11003C8600 /* Language.swift */; };
646FA83E2C072340001466BA /* GameVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 646FA83D2C072340001466BA /* GameVM.swift */; };
646FA8432C0730D6001466BA /* HistoricVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 646FA8422C0730D6001466BA /* HistoricVM.swift */; };
647D565C2BFD0212008D02EA /* PlayerResumeFrame.swift in Sources */ = {isa = PBXBuildFile; fileRef = 647D565B2BFD0212008D02EA /* PlayerResumeFrame.swift */; }; 647D565C2BFD0212008D02EA /* PlayerResumeFrame.swift in Sources */ = {isa = PBXBuildFile; fileRef = 647D565B2BFD0212008D02EA /* PlayerResumeFrame.swift */; };
6493C1C02C046BF900B5121D /* samurai.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6493C1BF2C046BF900B5121D /* samurai.ttf */; }; 6493C1C02C046BF900B5121D /* samurai.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6493C1BF2C046BF900B5121D /* samurai.ttf */; };
6493C1C22C046E5E00B5121D /* Fonts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6493C1C12C046E5E00B5121D /* Fonts.swift */; }; 6493C1C22C046E5E00B5121D /* Fonts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6493C1C12C046E5E00B5121D /* Fonts.swift */; };
@ -26,6 +31,7 @@
649B59AE2BF64EAB002BAE38 /* AppImages.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649B59AD2BF64EAB002BAE38 /* AppImages.swift */; }; 649B59AE2BF64EAB002BAE38 /* AppImages.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649B59AD2BF64EAB002BAE38 /* AppImages.swift */; };
649B59B22BF65392002BAE38 /* TextStyles.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649B59B12BF65392002BAE38 /* TextStyles.swift */; }; 649B59B22BF65392002BAE38 /* TextStyles.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649B59B12BF65392002BAE38 /* TextStyles.swift */; };
649B59B42BF653E1002BAE38 /* ViewTitleTextStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649B59B32BF653E1002BAE38 /* ViewTitleTextStyle.swift */; }; 649B59B42BF653E1002BAE38 /* ViewTitleTextStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649B59B32BF653E1002BAE38 /* ViewTitleTextStyle.swift */; };
64D2D74E2C25D380009BD010 /* Animals.Symbols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64D2D74D2C25D380009BD010 /* Animals.Symbols.swift */; };
64D992722C06281B002ACBC6 /* SystemIcons.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64D992712C06281B002ACBC6 /* SystemIcons.swift */; }; 64D992722C06281B002ACBC6 /* SystemIcons.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64D992712C06281B002ACBC6 /* SystemIcons.swift */; };
64FC4D692C09C78000D08B8B /* SelectPlayerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64FC4D682C09C78000D08B8B /* SelectPlayerView.swift */; }; 64FC4D692C09C78000D08B8B /* SelectPlayerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64FC4D682C09C78000D08B8B /* SelectPlayerView.swift */; };
64FC4D6B2C09C7C900D08B8B /* SelectPlayerButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64FC4D6A2C09C7C900D08B8B /* SelectPlayerButtonView.swift */; }; 64FC4D6B2C09C7C900D08B8B /* SelectPlayerButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64FC4D6A2C09C7C900D08B8B /* SelectPlayerButtonView.swift */; };
@ -37,6 +43,7 @@
EC05BFC82C04D832000F7B19 /* CustomSwitchButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC05BFC72C04D832000F7B19 /* CustomSwitchButton.swift */; }; EC05BFC82C04D832000F7B19 /* CustomSwitchButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC05BFC72C04D832000F7B19 /* CustomSwitchButton.swift */; };
EC05BFCB2C05F470000F7B19 /* GameScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC05BFCA2C05F470000F7B19 /* GameScene.swift */; }; EC05BFCB2C05F470000F7B19 /* GameScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC05BFCA2C05F470000F7B19 /* GameScene.swift */; };
EC2DD03F2C0CDF0C00FC55C0 /* MainMenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC2DD03E2C0CDF0C00FC55C0 /* MainMenuView.swift */; }; EC2DD03F2C0CDF0C00FC55C0 /* MainMenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC2DD03E2C0CDF0C00FC55C0 /* MainMenuView.swift */; };
EC2DD0412C1C203000FC55C0 /* ShowAllPlayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC2DD0402C1C203000FC55C0 /* ShowAllPlayer.swift */; };
EC3EE4B12C0CD46000710153 /* ButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC3EE4B02C0CD46000710153 /* ButtonView.swift */; }; EC3EE4B12C0CD46000710153 /* ButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC3EE4B02C0CD46000710153 /* ButtonView.swift */; };
EC3EE4B32C0CD47000710153 /* MainButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC3EE4B22C0CD47000710153 /* MainButton.swift */; }; EC3EE4B32C0CD47000710153 /* MainButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC3EE4B22C0CD47000710153 /* MainButton.swift */; };
EC62C4FB2C038BD20048CD0B /* PlayersView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC62C4FA2C038BD20048CD0B /* PlayersView.swift */; }; EC62C4FB2C038BD20048CD0B /* PlayersView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC62C4FA2C038BD20048CD0B /* PlayersView.swift */; };
@ -48,6 +55,12 @@
EC62C50F2C05D06A0048CD0B /* AddPlayerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC62C50E2C05D06A0048CD0B /* AddPlayerView.swift */; }; EC62C50F2C05D06A0048CD0B /* AddPlayerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC62C50E2C05D06A0048CD0B /* AddPlayerView.swift */; };
EC62C5172C0620C00048CD0B /* rap.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = EC62C5162C0620C00048CD0B /* rap.mp3 */; }; EC62C5172C0620C00048CD0B /* rap.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = EC62C5162C0620C00048CD0B /* rap.mp3 */; };
EC62C51B2C09D1790048CD0B /* PlayerStatView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC62C51A2C09D1790048CD0B /* PlayerStatView.swift */; }; EC62C51B2C09D1790048CD0B /* PlayerStatView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC62C51A2C09D1790048CD0B /* PlayerStatView.swift */; };
EC62C5252C0F68830048CD0B /* PlayerVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC62C5242C0F68830048CD0B /* PlayerVM.swift */; };
EC62C5292C1974000048CD0B /* PlayersVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC62C5282C1974000048CD0B /* PlayersVM.swift */; };
EC62C52D2C197ED10048CD0B /* Player.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC62C52C2C197ED10048CD0B /* Player.swift */; };
EC62C5382C1C64EE0048CD0B /* CoreManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC62C5372C1C64EE0048CD0B /* CoreManager.swift */; };
EC62C53D2C1C69200048CD0B /* DouShouQi_App.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = EC62C53B2C1C69200048CD0B /* DouShouQi_App.xcdatamodeld */; };
EC62C53F2C1C6D1A0048CD0B /* CDPlayerExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC62C53E2C1C6D1A0048CD0B /* CDPlayerExtension.swift */; };
EC99D5C12C089F6B00731B62 /* GameResumeFrame.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC99D5C02C089F6B00731B62 /* GameResumeFrame.swift */; }; EC99D5C12C089F6B00731B62 /* GameResumeFrame.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC99D5C02C089F6B00731B62 /* GameResumeFrame.swift */; };
ECB6364E2C04628E007CD5E2 /* SpriteMeeple.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECB6364D2C04628E007CD5E2 /* SpriteMeeple.swift */; }; ECB6364E2C04628E007CD5E2 /* SpriteMeeple.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECB6364D2C04628E007CD5E2 /* SpriteMeeple.swift */; };
ECB636512C046379007CD5E2 /* MusicPlayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECB636502C046379007CD5E2 /* MusicPlayer.swift */; }; ECB636512C046379007CD5E2 /* MusicPlayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECB636502C046379007CD5E2 /* MusicPlayer.swift */; };
@ -59,8 +72,16 @@
ECCBA6C12C29C0A300D6D9FB /* ARObjects in Resources */ = {isa = PBXBuildFile; fileRef = ECCBA6C02C29C0A300D6D9FB /* ARObjects */; }; ECCBA6C12C29C0A300D6D9FB /* ARObjects in Resources */ = {isa = PBXBuildFile; fileRef = ECCBA6C02C29C0A300D6D9FB /* ARObjects */; };
ECCBA6C32C29C25000D6D9FB /* ARKitUIViewBoard.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECCBA6C22C29C25000D6D9FB /* ARKitUIViewBoard.swift */; }; ECCBA6C32C29C25000D6D9FB /* ARKitUIViewBoard.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECCBA6C22C29C25000D6D9FB /* ARKitUIViewBoard.swift */; };
ECCBA6C52C29C2F500D6D9FB /* ARKitViewRepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECCBA6C42C29C2F500D6D9FB /* ARKitViewRepresentable.swift */; }; ECCBA6C52C29C2F500D6D9FB /* ARKitViewRepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECCBA6C42C29C2F500D6D9FB /* ARKitViewRepresentable.swift */; };
ECE777142C2068F400D354B0 /* EditPlayerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECE777132C2068F400D354B0 /* EditPlayerView.swift */; };
ECF3FD312C2722C600F5E62B /* CDHistoriqueExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECF3FD302C2722C600F5E62B /* CDHistoriqueExtension.swift */; };
ECF3FD332C27238F00F5E62B /* Historique.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECF3FD322C27238F00F5E62B /* Historique.swift */; };
ECF3FD3A2C29A20D00F5E62B /* HistoricListVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECF3FD392C29A20D00F5E62B /* HistoricListVM.swift */; };
ECF3FD3D2C29B64100F5E62B /* ChronoVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECF3FD3C2C29B64100F5E62B /* ChronoVM.swift */; };
ECF9AD2C2C29CF5C00238A06 /* DSQ.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = ECCBA6B32C29BCCD00D6D9FB /* DSQ.xcframework */; }; ECF9AD2C2C29CF5C00238A06 /* DSQ.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = ECCBA6B32C29BCCD00D6D9FB /* DSQ.xcframework */; };
ECF9AD2D2C29CF5C00238A06 /* DSQ.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = ECCBA6B32C29BCCD00D6D9FB /* DSQ.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; ECF9AD2D2C29CF5C00238A06 /* DSQ.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = ECCBA6B32C29BCCD00D6D9FB /* DSQ.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
ECF9AD352C29D46A00238A06 /* Start.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = ECF9AD322C29D46A00238A06 /* Start.mp3 */; };
ECF9AD362C29D46A00238A06 /* Fight.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = ECF9AD332C29D46A00238A06 /* Fight.mp3 */; };
ECF9AD372C29D46A00238A06 /* SelectFighterSound.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = ECF9AD342C29D46A00238A06 /* SelectFighterSound.mp3 */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */ /* Begin PBXContainerItemProxy section */
@ -78,6 +99,13 @@
remoteGlobalIDString = 645834572BF5F92300E18321; remoteGlobalIDString = 645834572BF5F92300E18321;
remoteInfo = DouShouQi_App; remoteInfo = DouShouQi_App;
}; };
ECF3FD212C2582B300F5E62B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = ECF3FD1D2C2582B300F5E62B /* ArKit.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = ECF3FD0A2C2582B200F5E62B;
remoteInfo = ArKit;
};
/* End PBXContainerItemProxy section */ /* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */ /* Begin PBXCopyFilesBuildPhase section */
@ -95,6 +123,7 @@
/* End PBXCopyFilesBuildPhase section */ /* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
6437FF122C25846F009D0EAF /* PlayingGameVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayingGameVM.swift; sourceTree = "<group>"; };
645834582BF5F92300E18321 /* DouShouQi_App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DouShouQi_App.app; sourceTree = BUILT_PRODUCTS_DIR; }; 645834582BF5F92300E18321 /* DouShouQi_App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DouShouQi_App.app; sourceTree = BUILT_PRODUCTS_DIR; };
6458345B2BF5F92300E18321 /* DouShouQi_AppApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DouShouQi_AppApp.swift; sourceTree = "<group>"; }; 6458345B2BF5F92300E18321 /* DouShouQi_AppApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DouShouQi_AppApp.swift; sourceTree = "<group>"; };
6458345D2BF5F92300E18321 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; }; 6458345D2BF5F92300E18321 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
@ -108,6 +137,10 @@
645834852BF5FE1400E18321 /* DouShouQi-App-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "DouShouQi-App-Info.plist"; sourceTree = SOURCE_ROOT; }; 645834852BF5FE1400E18321 /* DouShouQi-App-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "DouShouQi-App-Info.plist"; sourceTree = SOURCE_ROOT; };
645B4C1F2BFCCA0500FD658A /* PlayerScoreResumeFrame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerScoreResumeFrame.swift; sourceTree = "<group>"; }; 645B4C1F2BFCCA0500FD658A /* PlayerScoreResumeFrame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerScoreResumeFrame.swift; sourceTree = "<group>"; };
645B4C242BFCD3C600FD658A /* ScoreBoardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScoreBoardView.swift; sourceTree = "<group>"; }; 645B4C242BFCD3C600FD658A /* ScoreBoardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScoreBoardView.swift; sourceTree = "<group>"; };
646F04BD2C0F54C0003C8600 /* SettingsVM.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsVM.swift; sourceTree = "<group>"; };
646F04C02C0F5C11003C8600 /* Language.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Language.swift; sourceTree = "<group>"; };
646FA83D2C072340001466BA /* GameVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameVM.swift; sourceTree = "<group>"; };
646FA8422C0730D6001466BA /* HistoricVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HistoricVM.swift; sourceTree = "<group>"; };
647D565B2BFD0212008D02EA /* PlayerResumeFrame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerResumeFrame.swift; sourceTree = "<group>"; }; 647D565B2BFD0212008D02EA /* PlayerResumeFrame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerResumeFrame.swift; sourceTree = "<group>"; };
6493C1BF2C046BF900B5121D /* samurai.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = samurai.ttf; sourceTree = "<group>"; }; 6493C1BF2C046BF900B5121D /* samurai.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = samurai.ttf; sourceTree = "<group>"; };
6493C1C12C046E5E00B5121D /* Fonts.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Fonts.swift; sourceTree = "<group>"; }; 6493C1C12C046E5E00B5121D /* Fonts.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Fonts.swift; sourceTree = "<group>"; };
@ -118,6 +151,7 @@
649B59AD2BF64EAB002BAE38 /* AppImages.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppImages.swift; sourceTree = "<group>"; }; 649B59AD2BF64EAB002BAE38 /* AppImages.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppImages.swift; sourceTree = "<group>"; };
649B59B12BF65392002BAE38 /* TextStyles.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextStyles.swift; sourceTree = "<group>"; }; 649B59B12BF65392002BAE38 /* TextStyles.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextStyles.swift; sourceTree = "<group>"; };
649B59B32BF653E1002BAE38 /* ViewTitleTextStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewTitleTextStyle.swift; sourceTree = "<group>"; }; 649B59B32BF653E1002BAE38 /* ViewTitleTextStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewTitleTextStyle.swift; sourceTree = "<group>"; };
64D2D74D2C25D380009BD010 /* Animals.Symbols.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animals.Symbols.swift; sourceTree = "<group>"; };
64D992712C06281B002ACBC6 /* SystemIcons.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SystemIcons.swift; sourceTree = "<group>"; }; 64D992712C06281B002ACBC6 /* SystemIcons.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SystemIcons.swift; sourceTree = "<group>"; };
64FC4D682C09C78000D08B8B /* SelectPlayerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SelectPlayerView.swift; sourceTree = "<group>"; }; 64FC4D682C09C78000D08B8B /* SelectPlayerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SelectPlayerView.swift; sourceTree = "<group>"; };
64FC4D6A2C09C7C900D08B8B /* SelectPlayerButtonView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SelectPlayerButtonView.swift; sourceTree = "<group>"; }; 64FC4D6A2C09C7C900D08B8B /* SelectPlayerButtonView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SelectPlayerButtonView.swift; sourceTree = "<group>"; };
@ -129,6 +163,7 @@
EC05BFC72C04D832000F7B19 /* CustomSwitchButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomSwitchButton.swift; sourceTree = "<group>"; }; EC05BFC72C04D832000F7B19 /* CustomSwitchButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomSwitchButton.swift; sourceTree = "<group>"; };
EC05BFCA2C05F470000F7B19 /* GameScene.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameScene.swift; sourceTree = "<group>"; }; EC05BFCA2C05F470000F7B19 /* GameScene.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameScene.swift; sourceTree = "<group>"; };
EC2DD03E2C0CDF0C00FC55C0 /* MainMenuView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainMenuView.swift; sourceTree = "<group>"; }; EC2DD03E2C0CDF0C00FC55C0 /* MainMenuView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainMenuView.swift; sourceTree = "<group>"; };
EC2DD0402C1C203000FC55C0 /* ShowAllPlayer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShowAllPlayer.swift; sourceTree = "<group>"; };
EC3EE4B02C0CD46000710153 /* ButtonView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ButtonView.swift; sourceTree = "<group>"; }; EC3EE4B02C0CD46000710153 /* ButtonView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ButtonView.swift; sourceTree = "<group>"; };
EC3EE4B22C0CD47000710153 /* MainButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainButton.swift; sourceTree = "<group>"; }; EC3EE4B22C0CD47000710153 /* MainButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainButton.swift; sourceTree = "<group>"; };
EC62C4FA2C038BD20048CD0B /* PlayersView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayersView.swift; sourceTree = "<group>"; }; EC62C4FA2C038BD20048CD0B /* PlayersView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayersView.swift; sourceTree = "<group>"; };
@ -140,6 +175,12 @@
EC62C50E2C05D06A0048CD0B /* AddPlayerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddPlayerView.swift; sourceTree = "<group>"; }; EC62C50E2C05D06A0048CD0B /* AddPlayerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddPlayerView.swift; sourceTree = "<group>"; };
EC62C5162C0620C00048CD0B /* rap.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = rap.mp3; sourceTree = "<group>"; }; EC62C5162C0620C00048CD0B /* rap.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = rap.mp3; sourceTree = "<group>"; };
EC62C51A2C09D1790048CD0B /* PlayerStatView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerStatView.swift; sourceTree = "<group>"; }; EC62C51A2C09D1790048CD0B /* PlayerStatView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerStatView.swift; sourceTree = "<group>"; };
EC62C5242C0F68830048CD0B /* PlayerVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerVM.swift; sourceTree = "<group>"; };
EC62C5282C1974000048CD0B /* PlayersVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayersVM.swift; sourceTree = "<group>"; };
EC62C52C2C197ED10048CD0B /* Player.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Player.swift; sourceTree = "<group>"; };
EC62C5372C1C64EE0048CD0B /* CoreManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CoreManager.swift; sourceTree = "<group>"; };
EC62C53C2C1C69200048CD0B /* DouShouQi_App.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = DouShouQi_App.xcdatamodel; sourceTree = "<group>"; };
EC62C53E2C1C6D1A0048CD0B /* CDPlayerExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CDPlayerExtension.swift; sourceTree = "<group>"; };
EC99D5C02C089F6B00731B62 /* GameResumeFrame.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GameResumeFrame.swift; sourceTree = "<group>"; }; EC99D5C02C089F6B00731B62 /* GameResumeFrame.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GameResumeFrame.swift; sourceTree = "<group>"; };
ECB6364D2C04628E007CD5E2 /* SpriteMeeple.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpriteMeeple.swift; sourceTree = "<group>"; }; ECB6364D2C04628E007CD5E2 /* SpriteMeeple.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpriteMeeple.swift; sourceTree = "<group>"; };
ECB636502C046379007CD5E2 /* MusicPlayer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MusicPlayer.swift; sourceTree = "<group>"; }; ECB636502C046379007CD5E2 /* MusicPlayer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MusicPlayer.swift; sourceTree = "<group>"; };
@ -152,6 +193,15 @@
ECCBA6C02C29C0A300D6D9FB /* ARObjects */ = {isa = PBXFileReference; lastKnownFileType = folder; path = ARObjects; sourceTree = "<group>"; }; ECCBA6C02C29C0A300D6D9FB /* ARObjects */ = {isa = PBXFileReference; lastKnownFileType = folder; path = ARObjects; sourceTree = "<group>"; };
ECCBA6C22C29C25000D6D9FB /* ARKitUIViewBoard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ARKitUIViewBoard.swift; sourceTree = "<group>"; }; ECCBA6C22C29C25000D6D9FB /* ARKitUIViewBoard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ARKitUIViewBoard.swift; sourceTree = "<group>"; };
ECCBA6C42C29C2F500D6D9FB /* ARKitViewRepresentable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ARKitViewRepresentable.swift; sourceTree = "<group>"; }; ECCBA6C42C29C2F500D6D9FB /* ARKitViewRepresentable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ARKitViewRepresentable.swift; sourceTree = "<group>"; };
ECE777132C2068F400D354B0 /* EditPlayerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditPlayerView.swift; sourceTree = "<group>"; };
ECF3FD1D2C2582B300F5E62B /* ArKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ArKit.xcodeproj; path = ../../Swift/ArKit/ArKit.xcodeproj; sourceTree = "<group>"; };
ECF3FD302C2722C600F5E62B /* CDHistoriqueExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CDHistoriqueExtension.swift; sourceTree = "<group>"; };
ECF3FD322C27238F00F5E62B /* Historique.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Historique.swift; sourceTree = "<group>"; };
ECF3FD392C29A20D00F5E62B /* HistoricListVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HistoricListVM.swift; sourceTree = "<group>"; };
ECF3FD3C2C29B64100F5E62B /* ChronoVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChronoVM.swift; sourceTree = "<group>"; };
ECF9AD322C29D46A00238A06 /* Start.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = Start.mp3; sourceTree = "<group>"; };
ECF9AD332C29D46A00238A06 /* Fight.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = Fight.mp3; sourceTree = "<group>"; };
ECF9AD342C29D46A00238A06 /* SelectFighterSound.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = SelectFighterSound.mp3; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
@ -189,6 +239,7 @@
6458344F2BF5F92300E18321 = { 6458344F2BF5F92300E18321 = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
ECF3FD1D2C2582B300F5E62B /* ArKit.xcodeproj */,
6458345A2BF5F92300E18321 /* DouShouQi_App */, 6458345A2BF5F92300E18321 /* DouShouQi_App */,
6458346B2BF5F92600E18321 /* DouShouQi_AppTests */, 6458346B2BF5F92600E18321 /* DouShouQi_AppTests */,
645834752BF5F92600E18321 /* DouShouQi_AppUITests */, 645834752BF5F92600E18321 /* DouShouQi_AppUITests */,
@ -210,6 +261,8 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
ECCBA6BB2C29BE3C00D6D9FB /* ARViews */, ECCBA6BB2C29BE3C00D6D9FB /* ARViews */,
646F04BF2C0F5BD1003C8600 /* AppModelAndExtension */,
646FA83C2C072284001466BA /* ViewModel */,
ECB6364F2C04635D007CD5E2 /* SoundPlayerClass */, ECB6364F2C04635D007CD5E2 /* SoundPlayerClass */,
649B59A52BF64B1B002BAE38 /* Assets */, 649B59A52BF64B1B002BAE38 /* Assets */,
649ABF5E2BF60ED5002E8894 /* Components */, 649ABF5E2BF60ED5002E8894 /* Components */,
@ -218,6 +271,7 @@
6458345B2BF5F92300E18321 /* DouShouQi_AppApp.swift */, 6458345B2BF5F92300E18321 /* DouShouQi_AppApp.swift */,
6458345D2BF5F92300E18321 /* ContentView.swift */, 6458345D2BF5F92300E18321 /* ContentView.swift */,
6458345F2BF5F92500E18321 /* Assets.xcassets */, 6458345F2BF5F92500E18321 /* Assets.xcassets */,
EC62C53B2C1C69200048CD0B /* DouShouQi_App.xcdatamodeld */,
645834612BF5F92500E18321 /* Preview Content */, 645834612BF5F92500E18321 /* Preview Content */,
); );
path = DouShouQi_App; path = DouShouQi_App;
@ -256,6 +310,7 @@
647D565B2BFD0212008D02EA /* PlayerResumeFrame.swift */, 647D565B2BFD0212008D02EA /* PlayerResumeFrame.swift */,
EC62C4FC2C0391D30048CD0B /* PlayerRow.swift */, EC62C4FC2C0391D30048CD0B /* PlayerRow.swift */,
EC62C50E2C05D06A0048CD0B /* AddPlayerView.swift */, EC62C50E2C05D06A0048CD0B /* AddPlayerView.swift */,
EC2DD0402C1C203000FC55C0 /* ShowAllPlayer.swift */,
EC62C51A2C09D1790048CD0B /* PlayerStatView.swift */, EC62C51A2C09D1790048CD0B /* PlayerStatView.swift */,
); );
path = Player; path = Player;
@ -267,10 +322,50 @@
64FC4D682C09C78000D08B8B /* SelectPlayerView.swift */, 64FC4D682C09C78000D08B8B /* SelectPlayerView.swift */,
645B4C242BFCD3C600FD658A /* ScoreBoardView.swift */, 645B4C242BFCD3C600FD658A /* ScoreBoardView.swift */,
EC62C4FA2C038BD20048CD0B /* PlayersView.swift */, EC62C4FA2C038BD20048CD0B /* PlayersView.swift */,
ECE777132C2068F400D354B0 /* EditPlayerView.swift */,
); );
path = Player; path = Player;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
646F04BC2C0F5491003C8600 /* Settings */ = {
isa = PBXGroup;
children = (
646F04BD2C0F54C0003C8600 /* SettingsVM.swift */,
);
path = Settings;
sourceTree = "<group>";
};
646F04BF2C0F5BD1003C8600 /* AppModelAndExtension */ = {
isa = PBXGroup;
children = (
EC62C52B2C197EA80048CD0B /* Class */,
EC62C5232C0F68730048CD0B /* Extensions */,
646F04C02C0F5C11003C8600 /* Language.swift */,
);
path = AppModelAndExtension;
sourceTree = "<group>";
};
646FA83C2C072284001466BA /* ViewModel */ = {
isa = PBXGroup;
children = (
EC62C5262C11E24B0048CD0B /* Players */,
646F04BC2C0F5491003C8600 /* Settings */,
646FA83F2C0730B4001466BA /* Game */,
ECF3FD3C2C29B64100F5E62B /* ChronoVM.swift */,
);
path = ViewModel;
sourceTree = "<group>";
};
646FA83F2C0730B4001466BA /* Game */ = {
isa = PBXGroup;
children = (
ECF3FD3B2C29A21200F5E62B /* Historic */,
646FA83D2C072340001466BA /* GameVM.swift */,
6437FF122C25846F009D0EAF /* PlayingGameVM.swift */,
);
path = Game;
sourceTree = "<group>";
};
6493C1BE2C04650200B5121D /* Menu */ = { 6493C1BE2C04650200B5121D /* Menu */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@ -379,6 +474,9 @@
EC62C5032C045BD30048CD0B /* Sounds */ = { EC62C5032C045BD30048CD0B /* Sounds */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
ECF9AD332C29D46A00238A06 /* Fight.mp3 */,
ECF9AD342C29D46A00238A06 /* SelectFighterSound.mp3 */,
ECF9AD322C29D46A00238A06 /* Start.mp3 */,
EC62C50C2C046D9E0048CD0B /* SplashScreenSound.mp3 */, EC62C50C2C046D9E0048CD0B /* SplashScreenSound.mp3 */,
EC62C5052C045C1A0048CD0B /* TitleScreenButtonSound.mp3 */, EC62C5052C045C1A0048CD0B /* TitleScreenButtonSound.mp3 */,
); );
@ -395,6 +493,36 @@
path = Musics; path = Musics;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
EC62C5232C0F68730048CD0B /* Extensions */ = {
isa = PBXGroup;
children = (
EC62C53E2C1C6D1A0048CD0B /* CDPlayerExtension.swift */,
ECF3FD302C2722C600F5E62B /* CDHistoriqueExtension.swift */,
64D2D74D2C25D380009BD010 /* Animals.Symbols.swift */,
);
path = Extensions;
sourceTree = "<group>";
};
EC62C5262C11E24B0048CD0B /* Players */ = {
isa = PBXGroup;
children = (
EC62C5242C0F68830048CD0B /* PlayerVM.swift */,
EC62C5282C1974000048CD0B /* PlayersVM.swift */,
);
path = Players;
sourceTree = "<group>";
tabWidth = 4;
};
EC62C52B2C197EA80048CD0B /* Class */ = {
isa = PBXGroup;
children = (
ECE7770E2C1C6FB200D354B0 /* CoreData */,
EC62C52C2C197ED10048CD0B /* Player.swift */,
ECF3FD322C27238F00F5E62B /* Historique.swift */,
);
path = Class;
sourceTree = "<group>";
};
ECB6364F2C04635D007CD5E2 /* SoundPlayerClass */ = { ECB6364F2C04635D007CD5E2 /* SoundPlayerClass */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@ -414,6 +542,31 @@
path = ARViews; path = ARViews;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
ECE7770E2C1C6FB200D354B0 /* CoreData */ = {
isa = PBXGroup;
children = (
EC62C5372C1C64EE0048CD0B /* CoreManager.swift */,
);
path = CoreData;
sourceTree = "<group>";
};
ECF3FD1E2C2582B300F5E62B /* Products */ = {
isa = PBXGroup;
children = (
ECF3FD222C2582B300F5E62B /* ArKit.app */,
);
name = Products;
sourceTree = "<group>";
};
ECF3FD3B2C29A21200F5E62B /* Historic */ = {
isa = PBXGroup;
children = (
646FA8422C0730D6001466BA /* HistoricVM.swift */,
ECF3FD392C29A20D00F5E62B /* HistoricListVM.swift */,
);
path = Historic;
sourceTree = "<group>";
};
/* End PBXGroup section */ /* End PBXGroup section */
/* Begin PBXNativeTarget section */ /* Begin PBXNativeTarget section */
@ -503,6 +656,12 @@
mainGroup = 6458344F2BF5F92300E18321; mainGroup = 6458344F2BF5F92300E18321;
productRefGroup = 645834592BF5F92300E18321 /* Products */; productRefGroup = 645834592BF5F92300E18321 /* Products */;
projectDirPath = ""; projectDirPath = "";
projectReferences = (
{
ProductGroup = ECF3FD1E2C2582B300F5E62B /* Products */;
ProjectRef = ECF3FD1D2C2582B300F5E62B /* ArKit.xcodeproj */;
},
);
projectRoot = ""; projectRoot = "";
targets = ( targets = (
645834572BF5F92300E18321 /* DouShouQi_App */, 645834572BF5F92300E18321 /* DouShouQi_App */,
@ -512,6 +671,16 @@
}; };
/* End PBXProject section */ /* End PBXProject section */
/* Begin PBXReferenceProxy section */
ECF3FD222C2582B300F5E62B /* ArKit.app */ = {
isa = PBXReferenceProxy;
fileType = wrapper.application;
path = ArKit.app;
remoteRef = ECF3FD212C2582B300F5E62B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */ /* Begin PBXResourcesBuildPhase section */
645834562BF5F92300E18321 /* Resources */ = { 645834562BF5F92300E18321 /* Resources */ = {
isa = PBXResourcesBuildPhase; isa = PBXResourcesBuildPhase;
@ -522,8 +691,11 @@
6493C1C02C046BF900B5121D /* samurai.ttf in Resources */, 6493C1C02C046BF900B5121D /* samurai.ttf in Resources */,
ECCBA6C12C29C0A300D6D9FB /* ARObjects in Resources */, ECCBA6C12C29C0A300D6D9FB /* ARObjects in Resources */,
EC62C5062C045C1A0048CD0B /* TitleScreenButtonSound.mp3 in Resources */, EC62C5062C045C1A0048CD0B /* TitleScreenButtonSound.mp3 in Resources */,
ECF9AD352C29D46A00238A06 /* Start.mp3 in Resources */,
ECF9AD372C29D46A00238A06 /* SelectFighterSound.mp3 in Resources */,
EC62C5172C0620C00048CD0B /* rap.mp3 in Resources */, EC62C5172C0620C00048CD0B /* rap.mp3 in Resources */,
EC62C50D2C046D9E0048CD0B /* SplashScreenSound.mp3 in Resources */, EC62C50D2C046D9E0048CD0B /* SplashScreenSound.mp3 in Resources */,
ECF9AD362C29D46A00238A06 /* Fight.mp3 in Resources */,
645834632BF5F92500E18321 /* Preview Assets.xcassets in Resources */, 645834632BF5F92500E18321 /* Preview Assets.xcassets in Resources */,
645834602BF5F92500E18321 /* Assets.xcassets in Resources */, 645834602BF5F92500E18321 /* Assets.xcassets in Resources */,
ECB636552C047992007CD5E2 /* Image.xcassets in Resources */, ECB636552C047992007CD5E2 /* Image.xcassets in Resources */,
@ -553,7 +725,9 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
6458345E2BF5F92300E18321 /* ContentView.swift in Sources */, 6458345E2BF5F92300E18321 /* ContentView.swift in Sources */,
646FA83E2C072340001466BA /* GameVM.swift in Sources */,
649B59A92BF64C6A002BAE38 /* Colors.swift in Sources */, 649B59A92BF64C6A002BAE38 /* Colors.swift in Sources */,
646FA8432C0730D6001466BA /* HistoricVM.swift in Sources */,
EC3EE4B12C0CD46000710153 /* ButtonView.swift in Sources */, EC3EE4B12C0CD46000710153 /* ButtonView.swift in Sources */,
ECCBA6C52C29C2F500D6D9FB /* ARKitViewRepresentable.swift in Sources */, ECCBA6C52C29C2F500D6D9FB /* ARKitViewRepresentable.swift in Sources */,
649B59B42BF653E1002BAE38 /* ViewTitleTextStyle.swift in Sources */, 649B59B42BF653E1002BAE38 /* ViewTitleTextStyle.swift in Sources */,
@ -564,6 +738,7 @@
649B59B22BF65392002BAE38 /* TextStyles.swift in Sources */, 649B59B22BF65392002BAE38 /* TextStyles.swift in Sources */,
EC99D5C12C089F6B00731B62 /* GameResumeFrame.swift in Sources */, EC99D5C12C089F6B00731B62 /* GameResumeFrame.swift in Sources */,
EC05BFCB2C05F470000F7B19 /* GameScene.swift in Sources */, EC05BFCB2C05F470000F7B19 /* GameScene.swift in Sources */,
64D2D74E2C25D380009BD010 /* Animals.Symbols.swift in Sources */,
6458345C2BF5F92300E18321 /* DouShouQi_AppApp.swift in Sources */, 6458345C2BF5F92300E18321 /* DouShouQi_AppApp.swift in Sources */,
ECCBA6BD2C29BFF600D6D9FB /* ARBoard.swift in Sources */, ECCBA6BD2C29BFF600D6D9FB /* ARBoard.swift in Sources */,
ECB636512C046379007CD5E2 /* MusicPlayer.swift in Sources */, ECB636512C046379007CD5E2 /* MusicPlayer.swift in Sources */,
@ -571,17 +746,27 @@
649B59A42BF64574002BAE38 /* TitlePageFrame.swift in Sources */, 649B59A42BF64574002BAE38 /* TitlePageFrame.swift in Sources */,
EC0540C42C08A13E0032E9EF /* GameView.swift in Sources */, EC0540C42C08A13E0032E9EF /* GameView.swift in Sources */,
EC05BFC42C04C3C4000F7B19 /* SettingsView.swift in Sources */, EC05BFC42C04C3C4000F7B19 /* SettingsView.swift in Sources */,
ECF3FD312C2722C600F5E62B /* CDHistoriqueExtension.swift in Sources */,
ECF3FD3D2C29B64100F5E62B /* ChronoVM.swift in Sources */,
EC62C53D2C1C69200048CD0B /* DouShouQi_App.xcdatamodeld in Sources */,
EC62C50F2C05D06A0048CD0B /* AddPlayerView.swift in Sources */, EC62C50F2C05D06A0048CD0B /* AddPlayerView.swift in Sources */,
EC62C53F2C1C6D1A0048CD0B /* CDPlayerExtension.swift in Sources */,
64FC4D6B2C09C7C900D08B8B /* SelectPlayerButtonView.swift in Sources */, 64FC4D6B2C09C7C900D08B8B /* SelectPlayerButtonView.swift in Sources */,
646F04C12C0F5C11003C8600 /* Language.swift in Sources */,
EC05BFC82C04D832000F7B19 /* CustomSwitchButton.swift in Sources */, EC05BFC82C04D832000F7B19 /* CustomSwitchButton.swift in Sources */,
64D992722C06281B002ACBC6 /* SystemIcons.swift in Sources */, 64D992722C06281B002ACBC6 /* SystemIcons.swift in Sources */,
645B4C252BFCD3C600FD658A /* ScoreBoardView.swift in Sources */, 645B4C252BFCD3C600FD658A /* ScoreBoardView.swift in Sources */,
649ABF602BF60F2D002E8894 /* MainMenuButton.swift in Sources */, 649ABF602BF60F2D002E8894 /* MainMenuButton.swift in Sources */,
ECE777142C2068F400D354B0 /* EditPlayerView.swift in Sources */,
EC62C5382C1C64EE0048CD0B /* CoreManager.swift in Sources */,
EC62C5252C0F68830048CD0B /* PlayerVM.swift in Sources */,
ECF3FD332C27238F00F5E62B /* Historique.swift in Sources */,
EC62C51B2C09D1790048CD0B /* PlayerStatView.swift in Sources */, EC62C51B2C09D1790048CD0B /* PlayerStatView.swift in Sources */,
649B59B22BF65392002BAE38 /* TextStyles.swift in Sources */, 649B59B22BF65392002BAE38 /* TextStyles.swift in Sources */,
EC62C5092C0467240048CD0B /* SplashScreenView.swift in Sources */, EC62C5092C0467240048CD0B /* SplashScreenView.swift in Sources */,
EC2DD03F2C0CDF0C00FC55C0 /* MainMenuView.swift in Sources */, EC2DD03F2C0CDF0C00FC55C0 /* MainMenuView.swift in Sources */,
64FC4D692C09C78000D08B8B /* SelectPlayerView.swift in Sources */, 64FC4D692C09C78000D08B8B /* SelectPlayerView.swift in Sources */,
EC2DD0412C1C203000FC55C0 /* ShowAllPlayer.swift in Sources */,
EC62C4FD2C0391D30048CD0B /* PlayerRow.swift in Sources */, EC62C4FD2C0391D30048CD0B /* PlayerRow.swift in Sources */,
EC62C4FB2C038BD20048CD0B /* PlayersView.swift in Sources */, EC62C4FB2C038BD20048CD0B /* PlayersView.swift in Sources */,
6458345C2BF5F92300E18321 /* DouShouQi_AppApp.swift in Sources */, 6458345C2BF5F92300E18321 /* DouShouQi_AppApp.swift in Sources */,
@ -590,6 +775,11 @@
647D565C2BFD0212008D02EA /* PlayerResumeFrame.swift in Sources */, 647D565C2BFD0212008D02EA /* PlayerResumeFrame.swift in Sources */,
6493C1C22C046E5E00B5121D /* Fonts.swift in Sources */, 6493C1C22C046E5E00B5121D /* Fonts.swift in Sources */,
649B59A42BF64574002BAE38 /* TitlePageFrame.swift in Sources */, 649B59A42BF64574002BAE38 /* TitlePageFrame.swift in Sources */,
646F04BE2C0F54C0003C8600 /* SettingsVM.swift in Sources */,
EC62C52D2C197ED10048CD0B /* Player.swift in Sources */,
EC62C5292C1974000048CD0B /* PlayersVM.swift in Sources */,
6437FF132C25846F009D0EAF /* PlayingGameVM.swift in Sources */,
ECF3FD3A2C29A20D00F5E62B /* HistoricListVM.swift in Sources */,
ECCBA6C32C29C25000D6D9FB /* ARKitUIViewBoard.swift in Sources */, ECCBA6C32C29C25000D6D9FB /* ARKitUIViewBoard.swift in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
@ -923,6 +1113,19 @@
defaultConfigurationName = Debug; defaultConfigurationName = Debug;
}; };
/* End XCConfigurationList section */ /* End XCConfigurationList section */
/* Begin XCVersionGroup section */
EC62C53B2C1C69200048CD0B /* DouShouQi_App.xcdatamodeld */ = {
isa = XCVersionGroup;
children = (
EC62C53C2C1C69200048CD0B /* DouShouQi_App.xcdatamodel */,
);
currentVersion = EC62C53C2C1C69200048CD0B /* DouShouQi_App.xcdatamodel */;
path = DouShouQi_App.xcdatamodeld;
sourceTree = "<group>";
versionGroupType = wrapper.xcdatamodel;
};
/* End XCVersionGroup section */
}; };
rootObject = 645834502BF5F92300E18321 /* Project object */; rootObject = 645834502BF5F92300E18321 /* Project object */;
} }

@ -0,0 +1,154 @@
//
// CoreManger.swift
// DouShouQi_App
//
// Created by étudiant on 14/06/2024.
//
import Foundation
import CoreData
import DouShouQiModel
import Combine
class CoreDataManager {
static let shared = CoreDataManager()
private init() {}
lazy var persistentContainer: NSPersistentContainer = {
let container = NSPersistentContainer(name: "DouShouQi_App")
container.loadPersistentStores { (storeDescription, error) in
if let error = error as NSError? {
fatalError("Unresolved error \(error), \(error.userInfo)")
}
}
return container
}()
var context: NSManagedObjectContext {
return persistentContainer.viewContext
}
func saveContext() {
if context.hasChanges {
do {
try context.save()
} catch {
let nserror = error as NSError
fatalError("Unresolved error \(nserror), \(nserror.userInfo)")
}
}
}
func savePlayer(playerVM: PlayerVM) {
let player = CDPlayer(context: context)
player.name = playerVM.player.name
player.photo = playerVM.player.photo
saveContext()
}
func fetchPlayers() -> [CDPlayer] {
let fetchRequest: NSFetchRequest<CDPlayer> = CDPlayer.fetchRequest()
do {
return try context.fetch(fetchRequest)
} catch {
print("Failed to fetch players: \(error)")
return []
}
}
func deletePlayer(playerVM: PlayerVM) {
let fetchRequest: NSFetchRequest<CDPlayer> = CDPlayer.fetchRequest()
fetchRequest.predicate = NSPredicate(format: "name == %@", playerVM.player.name)
do {
let players = try context.fetch(fetchRequest)
if let playerToDelete = players.first {
context.delete(playerToDelete)
saveContext()
} else {
print("Player not found")
}
} catch {
print("Failed to fetch player for deletion: \(error)")
}
}
func updatePlayer(playerVM: PlayerVM) {
let fetchRequest: NSFetchRequest<CDPlayer> = CDPlayer.fetchRequest()
fetchRequest.predicate = NSPredicate(format: "name == %@", playerVM.player.name)
do {
let players = try context.fetch(fetchRequest)
if let playerToUpdate = players.first {
playerToUpdate.name = playerVM.player.name
playerToUpdate.photo = playerVM.player.photo
saveContext()
} else {
print("Player not found")
}
} catch {
print("Failed to fetch player for update: \(error)")
}
}
func saveHistorique(historique: HistoricVM) {
let historiqueEntity = CDHistorique(context: context)
historiqueEntity.player1_name = historique.historic.player1_name
historiqueEntity.player2_name = historique.historic.player2_name
historiqueEntity.time = historique.historic.time
historiqueEntity.result = historique.historic.result
saveContext()
}
func fetchHistoriques() -> [CDHistorique] {
let fetchRequest: NSFetchRequest<CDHistorique> = CDHistorique.fetchRequest()
do {
return try context.fetch(fetchRequest)
} catch {
print("Failed to fetch historiques: \(error)")
return []
}
}
func deleteHistorique(historique: Historique) {
let fetchRequest: NSFetchRequest<CDHistorique> = CDHistorique.fetchRequest()
fetchRequest.predicate = NSPredicate(format: "player1_name == %@ AND player2_name == %@ AND time == %@", historique.player1_name, historique.player2_name, historique.time)
do {
let historiques = try context.fetch(fetchRequest)
if let historiqueToDelete = historiques.first {
context.delete(historiqueToDelete)
saveContext()
} else {
print("Historique not found")
}
} catch {
print("Failed to fetch historique for deletion: \(error)")
}
}
func countVictories(for player: String) -> Int {
let fetchRequest: NSFetchRequest<CDHistorique> = CDHistorique.fetchRequest()
fetchRequest.predicate = NSPredicate(format: "(player1_name == %@ AND result == 'win') OR (player2_name == %@ AND result == 'lose')", player, player)
do {
return try context.fetch(fetchRequest).count
} catch {
print("Failed to fetch victories for player: \(error)")
return 0
}
}
func countDefeats(for player: String) -> Int {
let fetchRequest: NSFetchRequest<CDHistorique> = CDHistorique.fetchRequest()
fetchRequest.predicate = NSPredicate(format: "(player1_name == %@ AND result == 'lose') OR (player2_name == %@ AND result == 'win')", player, player)
do {
return try context.fetch(fetchRequest).count
} catch {
print("Failed to fetch defeats for player: \(error)")
return 0
}
}
}

@ -0,0 +1,22 @@
//
// Historique.swift
// DouShouQi_App
//
// Created by étudiant on 22/06/2024.
//
import Foundation
public class Historique{
var player1_name: String
var player2_name: String
var time: String
var result: String
init(player1_name: String, player2_name: String, time: String, result: String){
self.player1_name = player1_name
self.player2_name = player2_name
self.result = result
self.time = time
}
}

@ -0,0 +1,19 @@
//
// Player.swift
// DouShouQi_App
//
// Created by étudiant on 12/06/2024.
//
import Foundation
public class Player{
var name: String
var photo: String = ""
init(name: String, photo: String) {
self.name = name
self.photo = photo
}
}

@ -0,0 +1,34 @@
//
// Animals.Symbols.swift
// DouShouQi_App
//
// Created by Rémi REGNAULT on 21/06/2024.
//
import Foundation
import DouShouQiModel
extension Animal {
public var symbol: String {
switch self{
case .rat:
return "🐭"
case .cat:
return "🐱"
case .dog:
return "🐶"
case .wolf:
return "🐺"
case .leopard:
return "🐆"
case .tiger:
return "🐯"
case .lion:
return "🦁"
case .elephant:
return "🐘"
@unknown default:
return "🐥"
}
}
}

@ -0,0 +1,28 @@
//
// CDHistoriqueExtension.swift
// DouShouQi_App
//
// Created by étudiant on 22/06/2024.
//
import Foundation
import CoreData
extension CDHistorique {
func toModel() -> Historique {
return Historique(
player1_name: self.player1_name ?? "",
player2_name: self.player2_name ?? "",
time: self.time ?? "",
result: self.result ?? ""
)
}
convenience init(player1_name: String, player2_name: String, time: String, result: String, context: NSManagedObjectContext) {
self.init(context: context)
self.player1_name = player1_name
self.player2_name = player2_name
self.time = time
self.result = result
}
}

@ -0,0 +1,22 @@
//
// CDPlayerExtension.swift
// DouShouQi_App
//
// Created by étudiant on 14/06/2024.
//
import Foundation
import CoreData
extension CDPlayer {
func toModel() -> Player {
return Player(name: self.name ?? "", photo: self.photo ?? "")
}
convenience init(name: String, photo: String, context: NSManagedObjectContext){
self.init(context: context)
self.name = name
self.photo = photo
}
}

@ -0,0 +1,32 @@
//
// Language.swift
// DouShouQi_App
//
// Created by Rémi REGNAULT on 04/06/2024.
//
import Foundation
public enum Language: String, Identifiable {
case french, english, spanish
public var id: String {
return self.rawValue
}
public var litteral: String {
switch self {
case .french:
return "Français"
case .english:
return "English"
case .spanish:
return "Español"
}
}
static var list: [Language] {
return [.french, .english, .spanish]
}
}

@ -14,4 +14,6 @@ public struct Colors {
static let MeepleP1 = UIColor(named: "MeepleP1") static let MeepleP1 = UIColor(named: "MeepleP1")
static let TextButton = Color("ButtonTextColor") static let TextButton = Color("ButtonTextColor")
static let PopupBackground = Color("PopUpBackground") static let PopupBackground = Color("PopUpBackground")
static let MeepleP2 = UIColor(named: "MeepleP2")
static let WinnerBackground = Color("WinnerBackground")
} }

@ -23,9 +23,9 @@
"color-space" : "srgb", "color-space" : "srgb",
"components" : { "components" : {
"alpha" : "1.000", "alpha" : "1.000",
"blue" : "1.000", "blue" : "0.765",
"green" : "1.000", "green" : "0.855",
"red" : "1.000" "red" : "0.000"
} }
}, },
"idiom" : "universal" "idiom" : "universal"

@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "0.150",
"red" : "0.150"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "0.150",
"red" : "0.150"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "0.800",
"blue" : "1.000",
"green" : "1.000",
"red" : "1.000"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000",
"red" : "1.000"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

@ -6,33 +6,32 @@
// //
import SwiftUI import SwiftUI
#if DEBUG
import DouShouQiModel
#endif
struct GameResumeFrame: View { struct GameResumeFrame: View {
// Players Params // Players Params
let Player1Name: String let historicVm: HistoricVM
let Player2Name: String
// Game Params
let Status: String
var body: some View { var body: some View {
ZStack { ZStack {
HStack(alignment: .center) { HStack(alignment: .center) {
VStack(alignment: .leading) { VStack(alignment: .leading) {
Text("\(Player1Name) vs \(Player2Name)") Text("\(historicVm.historic.player1_name) vs \(historicVm.historic.player2_name)")
.font(.headline) .font(.headline)
Text(Status) Text(historicVm.historic.result)
.font(.subheadline)
.foregroundColor(.gray)
Text(historicVm.historic.time)
.font(.subheadline) .font(.subheadline)
.foregroundColor(.gray) .foregroundColor(.gray)
} }
Spacer() Spacer()
Text("Detail >")
.frame(width: 100)
.foregroundColor(.gray)
} }
.padding(10) .padding(10)
@ -43,9 +42,3 @@ struct GameResumeFrame: View {
}.padding(2) }.padding(2)
} }
} }
struct GameResumeFrame_Previews: PreviewProvider {
static var previews: some View {
GameResumeFrame(Player1Name: "Rayhan", Player2Name: "Remi", Status: "Winner: Remi")
}
}

@ -6,20 +6,24 @@
// //
import SwiftUI import SwiftUI
import DouShouQiModel
struct TopGameBoard: View { struct TopGameBoard: View {
@ObservedObject var gameVM: PlayingGameVM
@ObservedObject var chronoVM: ChronometerViewModel
var body: some View { var body: some View {
VStack { VStack {
HStack { HStack {
Circle() Circle()
.fill(Color.white) .fill(Color.white)
.frame(width: 40, height: 40) .frame(width: 40, height: 40)
Text("Player 1 Turn") Text("\(gameVM.currentPlayerName)'s Turn")
.font(.title) .font(.title)
.foregroundColor(.white) .foregroundColor(.white)
} }
.padding() .padding()
.background(Color.red) .background(Color(gameVM.currentPlayerColor))
.cornerRadius(10) .cornerRadius(10)
Spacer().frame(height: 20) Spacer().frame(height: 20)
@ -29,7 +33,7 @@ struct TopGameBoard: View {
Image(systemName: "clock") Image(systemName: "clock")
.resizable() .resizable()
.frame(width: 30, height: 30) .frame(width: 30, height: 30)
Text("4:11") Text(chronoVM.formattedTime())
.font(.title) .font(.title)
.foregroundColor(.black) .foregroundColor(.black)
} }
@ -37,14 +41,11 @@ struct TopGameBoard: View {
Spacer() Spacer()
HStack { HStack {
Text("Last moove :") Text("Last move :")
.font(.title2) .font(.title2)
.foregroundColor(.black) .foregroundColor(.black)
/*Image(systemName: "cheetah") Text(gameVM.lastPieceMoved)
.resizable() Text(gameVM.lastMove)
.frame(width: 30, height: 30)*/
Text("🦁")
Text("2.3")
.font(.title2) .font(.title2)
.foregroundColor(.black) .foregroundColor(.black)
} }
@ -59,9 +60,3 @@ struct TopGameBoard: View {
.background(Color.red.opacity(0.5)) .background(Color.red.opacity(0.5))
} }
} }
struct TopGameBoard_Previews: PreviewProvider {
static var previews: some View {
TopGameBoard()
}
}

@ -1,19 +1,19 @@
// //
// MainMenuButton.swift // MainMenuButton.swift
// DouShouQi_App // Dou}Qi_App
// //
// Created by Rémi REGNAULT on 16/05/2024. // Created by Rémi REGNAULT on 16/05/2024.
// //
import SwiftUI import SwiftUI
struct MainMenuButton<Destination: View>: View { struct MainMenuButton: View {
// Text Params // Text Params
var text: String var text: String
var destination: Destination
var sound: String var sound: String
// Fonction à executer
var onClick: (() -> Void)?
// Button Alignment // Button Alignment
var horizontalAlignment: Alignment = .center var horizontalAlignment: Alignment = .center
@ -25,7 +25,10 @@ struct MainMenuButton<Destination: View>: View {
var bottomRightCorner: CGFloat = 0 var bottomRightCorner: CGFloat = 0
var body: some View { var body: some View {
NavigationLink(destination: destination) { Button(action: {
// playSound(named: sound)
onClick?()
}) {
Text(text.uppercased()) Text(text.uppercased())
.font(.headline) .font(.headline)
.fontWeight(.semibold) .fontWeight(.semibold)
@ -37,12 +40,10 @@ struct MainMenuButton<Destination: View>: View {
.clipShape(RoundedRectangle(cornerSize: CGSize(width: 0, height: 0))) .clipShape(RoundedRectangle(cornerSize: CGSize(width: 0, height: 0)))
.mask(RoundedCornersShape(cornerRadii: (topLeft: topLeftCorner, topRight: topRightCorner, bottomLeft: bottomLeftCorner, bottomRight: bottomRightCorner))) .mask(RoundedCornersShape(cornerRadii: (topLeft: topLeftCorner, topRight: topRightCorner, bottomLeft: bottomLeftCorner, bottomRight: bottomRightCorner)))
) )
.frame(width: UIScreen.main.bounds.width / 1.7)
.frame(maxWidth: .infinity, alignment: horizontalAlignment)
} }
.simultaneousGesture(TapGesture().onEnded { .buttonStyle(PlainButtonStyle())
playSound(named: sound)
})
.frame(width: UIScreen.main.bounds.width / 1.7)
.frame(maxWidth: .infinity, alignment: horizontalAlignment)
} }
} }
@ -92,6 +93,6 @@ struct RoundedCornersShape: Shape {
struct MainMenuButton_Previews: PreviewProvider { struct MainMenuButton_Previews: PreviewProvider {
static var previews: some View { static var previews: some View {
MainMenuButton(text: "test", destination: HistoricView(), sound: "TitleScreenButtonSound", horizontalAlignment: .leading, topRightCorner: 10, bottomRightCorner: 10) MainMenuButton(text: "test", sound: "TitleScreenButtonSound", horizontalAlignment: .leading, topRightCorner: 10, bottomRightCorner: 10)
} }
} }

@ -10,7 +10,7 @@ import UIKit
struct AddPlayerView: View { struct AddPlayerView: View {
@Binding var isPresented: Bool @Binding var isPresented: Bool
@Binding var players: [Player] @ObservedObject var playersVM: PlayersVM
@State private var playerName: String = "" @State private var playerName: String = ""
@State private var showAlert = false @State private var showAlert = false
@State private var showImagePicker = false @State private var showImagePicker = false
@ -48,7 +48,7 @@ struct AddPlayerView: View {
HStack { HStack {
Button(action: { Button(action: {
if players.contains(where: { $0.name.lowercased() == playerName.lowercased() }) { if playersVM.contains(where: { $0.player.name.lowercased() == playerName.lowercased() }) {
showAlert = true showAlert = true
} else { } else {
if let image = profileImage, let imageData = image.jpegData(compressionQuality: 0.8) { if let image = profileImage, let imageData = image.jpegData(compressionQuality: 0.8) {
@ -59,8 +59,8 @@ struct AddPlayerView: View {
try? imageData.write(to: fileURL) try? imageData.write(to: fileURL)
profileImagePath = fileURL.path profileImagePath = fileURL.path
} }
let newPlayer = Player(name: playerName, wins: 0, losses: 0, photo: profileImagePath) let newPlayer = PlayerVM(player: Player(name: playerName, photo: profileImagePath))
players.append(newPlayer) playersVM.SavePlayer(player: newPlayer)
isPresented = false isPresented = false
} }
}) { }) {

@ -1,22 +1,15 @@
//
// PlayerRow.swift
// DouShouQi_App
//
// Created by étudiant on 26/05/2024.
//
import Foundation import Foundation
import SwiftUI import SwiftUI
struct PlayerRow: View { struct PlayerRow: View {
var player: Player @ObservedObject var player: PlayerVM
@Binding var players: [Player]
@State private var showDetailView = false @State private var showDetailView = false
@ObservedObject var players: PlayersVM
var body: some View { var body: some View {
HStack { HStack {
if let image = UIImage(contentsOfFile: player.photo) { if let image = UIImage(contentsOfFile: player.player.photo) {
Image(uiImage: image) Image(uiImage: image)
.resizable() .resizable()
.frame(width: 50, height: 50) .frame(width: 50, height: 50)
@ -30,21 +23,23 @@ struct PlayerRow: View {
} }
VStack(alignment: .leading) { VStack(alignment: .leading) {
Text(player.name) Text(player.player.name)
.font(.headline) .font(.headline)
Text("Victoires : \(player.wins) Défaites : \(player.losses)") Text("Victoires : \(player.win) Défaites : \(player.loose)")
.font(.subheadline) .font(.subheadline)
} }
Spacer() Spacer()
Button(action: { HStack(spacing: 10) {
showDetailView.toggle() Button(action: {
}) { showDetailView.toggle()
Image(systemName: "info.circle") }) {
.foregroundColor(.blue) Image(systemName: "info.circle")
} .foregroundColor(.blue)
.sheet(isPresented: $showDetailView) { }
PlayerStatView(player: player) .sheet(isPresented: $showDetailView) {
.presentationDetents([.medium, .large]) PlayerStatView(player: player, players: players, showDetailView: $showDetailView)
.presentationDetents([.medium, .large])
}
} }
} }
.padding() .padding()

@ -8,11 +8,14 @@
import SwiftUI import SwiftUI
struct PlayerStatView: View { struct PlayerStatView: View {
var player: Player @StateObject var player: PlayerVM
@State private var showEditView = false
@State private var showDeleteAlert = false
@ObservedObject var players: PlayersVM
@Binding var showDetailView: Bool
var body: some View { var body: some View {
VStack { VStack {
if let image = UIImage(contentsOfFile: player.photo) { if let image = UIImage(contentsOfFile: player.player.photo) {
Image(uiImage: image) Image(uiImage: image)
.resizable() .resizable()
.frame(width: 100, height: 100) .frame(width: 100, height: 100)
@ -28,7 +31,7 @@ struct PlayerStatView: View {
.padding(.top, 10) .padding(.top, 10)
} }
Text(player.name) Text(player.player.name)
.font(.largeTitle) .font(.largeTitle)
.foregroundColor(Colors.TitleText) .foregroundColor(Colors.TitleText)
.padding(.top, 10) .padding(.top, 10)
@ -36,24 +39,58 @@ struct PlayerStatView: View {
VStack(alignment: .leading, spacing: 10) { VStack(alignment: .leading, spacing: 10) {
HStack { HStack {
Image(systemName: "trophy.fill") Image(systemName: "trophy.fill")
Text("Win : \(player.wins)") Text("Win : \(player.win)")
.font(.title2) .font(.title2)
} }
HStack { HStack {
Image(systemName: "xmark.circle.fill") Image(systemName: "xmark.circle.fill")
Text("Loose : \(player.losses)") Text("Loose : \(player.loose)")
.font(.title2) .font(.title2)
} }
HStack { HStack {
Image(systemName: "chart.line.uptrend.xyaxis") Image(systemName: "chart.line.uptrend.xyaxis")
Text("Win Rate : \(String(format: "%.2f", Double(player.wins) / Double(player.wins + player.losses) * 100))%") Text("Win Rate : \(String(format: "%.2f", (Double(player.win) / Double(player.win + player.loose)) * 100))%")
.font(.title2) .font(.title2)
} }
HStack { HStack {
Image(systemName: "list.number") Image(systemName: "list.number")
Text("Rank : 3") Text("Rank : \(player.rank)")
.font(.title2) .font(.title2)
} }
HStack{
Button(action: {
showEditView.toggle()
}) {
Image(systemName: "pencil")
.foregroundColor(.green)
}
.sheet(isPresented: $showEditView) {
EditPlayerView(isPresented: $showEditView, player: player, playersVM: players, playerName: player.player.name)
}
Button(action: {
showDeleteAlert.toggle()
}) {
Image(systemName: "trash")
.foregroundColor(.red)
}
.alert(isPresented: $showDeleteAlert) {
Alert(
title: Text("Delete Player"),
message: Text("Are you sure you want to delete this player?"),
primaryButton: .destructive(Text("Delete")) {
CoreDataManager.shared.deletePlayer(playerVM: player)
players.refreshPlayers()
showDetailView = false
},
secondaryButton: .cancel()
)
}
}
} }
.padding() .padding()
Spacer() Spacer()

@ -35,8 +35,15 @@ struct CustomShapeRightButton: Shape {
struct SelectPlayerButtonView: View { struct SelectPlayerButtonView: View {
var player1:String = "IA"
var player2:String = "IA" @ObservedObject var player1:PlayerVM
@ObservedObject var player2:PlayerVM
@ObservedObject var playersVM: PlayersVM
@State private var showingPopup1 = false
@State private var showingPopup2 = false
var body: some View { var body: some View {
ZStack{ ZStack{
Image("vs-custom") Image("vs-custom")
@ -46,11 +53,12 @@ struct SelectPlayerButtonView: View {
.offset(y: -60) .offset(y: -60)
HStack{ HStack{
VStack (alignment: .leading) { VStack (alignment: .leading) {
Text(player1) Text(player1.player.name)
.font(.title) .font(.title)
.padding(3) .padding(3)
Button(action: { Button(action: {
print("Button j1 pressé!") print("Button j1 pressé!")
showingPopup1 = true
}) { }) {
VStack { VStack {
Text("+") Text("+")
@ -59,23 +67,26 @@ struct SelectPlayerButtonView: View {
Text("Add a player") Text("Add a player")
.font(.body) .font(.body)
.bold() .bold()
.sheet(isPresented: $showingPopup1) {
ShowAllPlayer(currentShowingSheet: $showingPopup1, currentPlayer: player1, otherPlayer: player2, playersVM: playersVM)
}
} }
.frame(width: 150, height: 150) .frame(width: 150, height: 150)
.padding() .padding()
.border(/*@START_MENU_TOKEN@*/Color.black/*@END_MENU_TOKEN@*/, width: 4) .border(Colors.TitleText, width: 4)
.foregroundColor(.black) .foregroundColor(Colors.TitleText)
.foregroundColor(.white)
.cornerRadius(10) .cornerRadius(10)
.clipShape(CustomShapeLeftButton()) .clipShape(CustomShapeLeftButton())
} }
} }
VStack (alignment: .trailing) { VStack (alignment: .trailing) {
Text(player2) Text(player2.player.name)
.font(.title) .font(.title)
.padding(3) .padding(3)
Button(action: { Button(action: {
print("Button j2 pressé!") print("Button j2 pressé!")
showingPopup2 = true
}) { }) {
VStack { VStack {
Text("+") Text("+")
@ -84,11 +95,13 @@ struct SelectPlayerButtonView: View {
Text("Add a player") Text("Add a player")
.font(.body) .font(.body)
.bold() .bold()
} .frame(width: 150, height: 150) .sheet(isPresented: $showingPopup2) {
ShowAllPlayer(currentShowingSheet: $showingPopup2, currentPlayer: player2, otherPlayer: player1, playersVM: playersVM)
}
}.frame(width: 150, height: 150)
.padding() .padding()
.foregroundColor(.black) .border(Colors.TitleText, width: 4)
.border(/*@START_MENU_TOKEN@*/Color.black/*@END_MENU_TOKEN@*/, width: 4) .foregroundColor(Colors.TitleText)
.foregroundColor(.white)
.cornerRadius(10) .cornerRadius(10)
.clipShape(CustomShapeRightButton()) .clipShape(CustomShapeRightButton())
} }
@ -98,8 +111,13 @@ struct SelectPlayerButtonView: View {
} }
} }
struct SelectPlayerButtonView_Previews: PreviewProvider { /*struct SelectPlayerButtonView_Previews: PreviewProvider {
var player1 = PlayerVM(player: Player(name: "Linked", photo: ""))
var player22 = PlayerVM(player: Player(name: "Horizon", photo: ""))
static var previews: some View { static var previews: some View {
SelectPlayerButtonView() @StateObject var playersVM = PlayersVM()
SelectPlayerButtonView(player1: player1, player2: player2, playersVM: PlayersVM())
} }
} }*/

@ -0,0 +1,87 @@
//
// ShowAllPlayer.swift
// DouShouQi_App
//
// Created by Nathan Verdier on 14/06/2024.
//
import SwiftUI
struct ShowAllPlayer: View {
@State private var isShowingSheet = false
@Binding var currentShowingSheet: Bool
@ObservedObject var currentPlayer: PlayerVM
@ObservedObject var otherPlayer: PlayerVM
@ObservedObject var playersVM: PlayersVM
var body: some View {
VStack(alignment: .leading, spacing: 20) {
Text("Choose a player:")
.font(.title2)
.fontWeight(.bold)
.padding(.leading)
.padding(.top, 20)
List {
ForEach($playersVM.players, id: \.self) { playerVM in
if otherPlayer.player.name != playerVM.player.wrappedValue.name {
Button(action: {
if currentPlayer.player.name == playerVM.player.wrappedValue.name {
currentPlayer.player = Player(name: "IA", photo: "")
} else {
currentPlayer.player = playerVM.player.wrappedValue
}
self.currentShowingSheet = false
}) {
HStack {
Image(systemName: "person.fill")
.resizable()
.frame(width: 30, height: 30)
.foregroundColor(.blue)
.padding(.trailing, 10)
Text(playerVM.player.name.wrappedValue)
.font(.headline)
.foregroundColor(.primary)
Spacer()
if currentPlayer.player.name == playerVM.player.wrappedValue.name {
Image(systemName: "checkmark.circle.fill")
.foregroundColor(.green)
}
}
.padding()
.background(Color(.systemGray6))
.cornerRadius(10)
.shadow(radius: 2)
}
}
}
}
.listStyle(InsetGroupedListStyle())
Button(action: {
self.isShowingSheet = true
}) {
HStack {
Image(systemName: "plus.circle.fill")
.foregroundColor(.white)
Text("Add a player")
.font(.headline)
.foregroundColor(.white)
}
.padding()
.frame(maxWidth: .infinity)
.background(Color.red)
.cornerRadius(10)
.padding(.horizontal)
}
.padding(.bottom, 20)
.sheet(isPresented: $isShowingSheet) {
AddPlayerView(isPresented: $isShowingSheet, playersVM: playersVM)
}
}
.background(Color(.systemGroupedBackground))
.edgesIgnoringSafeArea(.all)
}
}

@ -6,32 +6,37 @@
// //
import Foundation import Foundation
import SwiftUI
import SpriteKit import SpriteKit
import DouShouQiModel import DouShouQiModel
class GameScene : SKScene { class GameScene : SKScene {
var game: Game = try! Game(withRules: ClassicRules(), andPlayer1: RandomPlayer(withName: "Rayhan", andId: .player1)!, andPlayer2: RandomPlayer(withName: "Rémi", andId: .player2)!)
var player1: DouShouQiModel.Player?
var player2: DouShouQiModel.Player?
var game: Game?
let pieces: [Owner : [Animal:SpriteMeeple]] = [ let pieces: [Owner : [Animal:SpriteMeeple]] = [
.player1: [ .player1: [
.rat: SpriteMeeple(imageNamed: AppImages.Rat, size: CGSize(width: 100, height: 100), backgroundColor: Colors.MeepleP1!), .rat: SpriteMeeple(imageNamed: AppImages.Rat, size: CGSize(width: 100, height: 100), backgroundColor: Colors.MeepleP1!, imageRotation: 180),
.cat: SpriteMeeple(imageNamed: AppImages.Cat, size: CGSize(width: 100, height: 100), backgroundColor: Colors.MeepleP1!), .cat: SpriteMeeple(imageNamed: AppImages.Cat, size: CGSize(width: 100, height: 100), backgroundColor: Colors.MeepleP1!, imageRotation: 180),
.dog: SpriteMeeple(imageNamed: AppImages.Dog, size: CGSize(width: 100, height: 100), backgroundColor: Colors.MeepleP1!), .dog: SpriteMeeple(imageNamed: AppImages.Dog, size: CGSize(width: 100, height: 100), backgroundColor: Colors.MeepleP1!, imageRotation: 180),
.wolf: SpriteMeeple(imageNamed: AppImages.Wolf, size: CGSize(width: 100, height: 100), backgroundColor: Colors.MeepleP1!), .wolf: SpriteMeeple(imageNamed: AppImages.Wolf, size: CGSize(width: 100, height: 100), backgroundColor: Colors.MeepleP1!, imageRotation: 180),
.leopard: SpriteMeeple(imageNamed: AppImages.Leopard, size: CGSize(width: 100, height: 100), backgroundColor: Colors.MeepleP1!), .leopard: SpriteMeeple(imageNamed: AppImages.Leopard, size: CGSize(width: 100, height: 100), backgroundColor: Colors.MeepleP1!, imageRotation: 180),
.lion: SpriteMeeple(imageNamed: AppImages.Lion, size: CGSize(width: 100, height: 100), backgroundColor: Colors.MeepleP1!), .lion: SpriteMeeple(imageNamed: AppImages.Lion, size: CGSize(width: 100, height: 100), backgroundColor: Colors.MeepleP1!, imageRotation: 180),
.tiger: SpriteMeeple(imageNamed: AppImages.Tigger, size: CGSize(width: 100, height: 100), backgroundColor: Colors.MeepleP1!), .tiger: SpriteMeeple(imageNamed: AppImages.Tigger, size: CGSize(width: 100, height: 100), backgroundColor: Colors.MeepleP1!, imageRotation: 180),
.elephant: SpriteMeeple(imageNamed: AppImages.Elephant, size: CGSize(width: 100, height: 100), backgroundColor: Colors.MeepleP1!), .elephant: SpriteMeeple(imageNamed: AppImages.Elephant, size: CGSize(width: 100, height: 100), backgroundColor: Colors.MeepleP1!, imageRotation: 180),
], ],
.player2: [ .player2: [
.rat: SpriteMeeple(imageNamed: AppImages.Rat, size: CGSize(width: 100, height: 100), backgroundColor: .blue, imageRotation: 180), .rat: SpriteMeeple(imageNamed: AppImages.Rat, size: CGSize(width: 100, height: 100), backgroundColor: Colors.MeepleP2!),
.cat: SpriteMeeple(imageNamed: AppImages.Cat, size: CGSize(width: 100, height: 100), backgroundColor: .blue, imageRotation: 180), .cat: SpriteMeeple(imageNamed: AppImages.Cat, size: CGSize(width: 100, height: 100), backgroundColor: Colors.MeepleP2!),
.dog: SpriteMeeple(imageNamed: AppImages.Dog, size: CGSize(width: 100, height: 100), backgroundColor: .blue, imageRotation: 180), .dog: SpriteMeeple(imageNamed: AppImages.Dog, size: CGSize(width: 100, height: 100), backgroundColor: Colors.MeepleP2!),
.wolf: SpriteMeeple(imageNamed: AppImages.Wolf, size: CGSize(width: 100, height: 100), backgroundColor: .blue, imageRotation: 180), .wolf: SpriteMeeple(imageNamed: AppImages.Wolf, size: CGSize(width: 100, height: 100), backgroundColor: Colors.MeepleP2!),
.leopard: SpriteMeeple(imageNamed: AppImages.Leopard, size: CGSize(width: 100, height: 100), backgroundColor: .blue, imageRotation: 180), .leopard: SpriteMeeple(imageNamed: AppImages.Leopard, size: CGSize(width: 100, height: 100), backgroundColor: Colors.MeepleP2!),
.lion: SpriteMeeple(imageNamed: AppImages.Lion, size: CGSize(width: 100, height: 100), backgroundColor: .blue, imageRotation: 180), .lion: SpriteMeeple(imageNamed: AppImages.Lion, size: CGSize(width: 100, height: 100), backgroundColor: Colors.MeepleP2!),
.tiger: SpriteMeeple(imageNamed: AppImages.Tigger, size: CGSize(width: 100, height: 100), backgroundColor: .blue, imageRotation: 180), .tiger: SpriteMeeple(imageNamed: AppImages.Tigger, size: CGSize(width: 100, height: 100), backgroundColor: Colors.MeepleP2!),
.elephant: SpriteMeeple(imageNamed: AppImages.Elephant, size: CGSize(width: 100, height: 100), backgroundColor: .blue, imageRotation: 180), .elephant: SpriteMeeple(imageNamed: AppImages.Elephant, size: CGSize(width: 100, height: 100), backgroundColor: Colors.MeepleP2!),
], ],
] ]
@ -45,27 +50,41 @@ class GameScene : SKScene {
self.backgroundColor = .white self.backgroundColor = .white
self.addChild(imageBoard) self.addChild(imageBoard)
}
convenience init(size: CGSize, gameVM: PlayingGameVM) {
self.init(size: size)
self.game = gameVM.game
self.player1 = self.game?.players[.player1]
self.player2 = self.game?.players[.player2]
for piece in pieces.flatMap({owner, pieces in pieces.values}) { for piece in pieces.flatMap({owner, pieces in pieces.values}) {
self.addChild(piece) self.addChild(piece)
piece.setOnMove(onMove: gameVM.onMeepleMove)
}
initializeBoard(game!.board)
gameVM.game.addPieceRemovedListener { _, _, piece in
self.pieces[piece.owner]![piece.animal]?.removeFromParent()
} }
initializeBoard(game.board) gameVM.start()
} }
func initializeBoard(_ board: Board) { func initializeBoard(_ board: Board) {
for (lineIndex, currentLine) in game.board.grid.enumerated() { for (lineIndex, currentLine) in game!.board.grid.enumerated() {
for (cellIndex, currentCell) in currentLine.enumerated() { for (cellIndex, currentCell) in currentLine.enumerated() {
if let piece = currentCell.piece { if let piece = currentCell.piece {
pieces[piece.owner]?[piece.animal]?.cellPosition = CGPoint(x: cellIndex-3, y: lineIndex-4) pieces[piece.owner]?[piece.animal]?.cellPosition = CGPoint(x: cellIndex, y: lineIndex)
pieces[piece.owner]?[piece.animal]?.cellPosition = CGPoint(x: 0, y: 0) pieces[piece.owner]?[piece.animal]?.cellPosition = CGPoint(x: 0, y: 0)
print("line :", lineIndex, " cologne: ", cellIndex)
} }
} }
} }
} }
required init?(coder aDecoder: NSCoder) { required init?(coder aDecoder: NSCoder) {
game = try! Game(withRules: ClassicRules(), andPlayer1: DouShouQiModel.Player(withName: "P1", andId: .player1)!, andPlayer2: DouShouQiModel.Player(withName: "P2", andId: .player2)!)
super.init(coder: aDecoder); super.init(coder: aDecoder);
} }
} }

@ -10,8 +10,8 @@ import SpriteKit
class SpriteMeeple : SKNode { class SpriteMeeple : SKNode {
static let offset = CGPoint(x: 0, y: 0) static let offset = CGPoint(x: -300, y: 400)
static let direction = CGVector(dx: 100, dy: 100) static let direction = CGVector(dx: 100, dy: -100)
let imageNode : SKSpriteNode let imageNode : SKSpriteNode
var ellipseNode : SKShapeNode var ellipseNode : SKShapeNode
@ -19,13 +19,21 @@ class SpriteMeeple : SKNode {
var originalSize: CGSize var originalSize: CGSize
var originalEllipseSize: CGSize var originalEllipseSize: CGSize
var onMove: ((SpriteMeeple, CGPoint, CGPoint) -> ())?
var cellPosition: CGPoint{ var cellPosition: CGPoint{
didSet(cellPosition){ didSet(cellPosition){
self.position.x = SpriteMeeple.offset.x + SpriteMeeple.direction.dx*cellPosition.x self.position.x = SpriteMeeple.offset.x + SpriteMeeple.direction.dx*cellPosition.x
self.position.y = SpriteMeeple.offset.y + SpriteMeeple.direction.dx*cellPosition.y self.position.y = SpriteMeeple.offset.y + SpriteMeeple.direction.dy*cellPosition.y
} }
} }
private var oldCellPosition: CGPoint?
func getCellPosition() -> CGPoint {
return CGPoint(x: Int((self.position.x - SpriteMeeple.offset.x)/SpriteMeeple.direction.dx), y: Int((self.position.y - SpriteMeeple.offset.y)/SpriteMeeple.direction.dy))
}
init(imageNamed imageName: String, size: CGSize, backgroundColor: UIColor, imageRotation : Double = 0){ init(imageNamed imageName: String, size: CGSize, backgroundColor: UIColor, imageRotation : Double = 0){
imageNode = SKSpriteNode(imageNamed: imageName) imageNode = SKSpriteNode(imageNamed: imageName)
originalSize = CGSize(width: 80, height: 65) originalSize = CGSize(width: 80, height: 65)
@ -57,12 +65,16 @@ class SpriteMeeple : SKNode {
super.init(coder: aDecoder) super.init(coder: aDecoder)
} }
public func setOnMove(onMove: @escaping (SpriteMeeple, CGPoint, CGPoint) -> ()) { self.onMove = onMove }
override var isUserInteractionEnabled: Bool{ override var isUserInteractionEnabled: Bool{
set { } set { }
get { true } get { true }
} }
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?){ override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?){
self.oldCellPosition = getCellPosition()
imageNode.size = CGSize(width: imageNode.size.width * 1.1, height: imageNode.size.height * 1.1) imageNode.size = CGSize(width: imageNode.size.width * 1.1, height: imageNode.size.height * 1.1)
ellipseNode.path = SKShapeNode(ellipseOf: CGSize(width: originalEllipseSize.width*1.1, height: originalEllipseSize.height*1.1)).path ellipseNode.path = SKShapeNode(ellipseOf: CGSize(width: originalEllipseSize.width*1.1, height: originalEllipseSize.height*1.1)).path
self.zPosition = 1 self.zPosition = 1
@ -84,10 +96,13 @@ class SpriteMeeple : SKNode {
imageNode.size = originalSize imageNode.size = originalSize
ellipseNode.path = SKShapeNode(ellipseOf: originalEllipseSize).path ellipseNode.path = SKShapeNode(ellipseOf: originalEllipseSize).path
if let onMove: (SpriteMeeple, CGPoint, CGPoint) -> () = onMove {
onMove(self, self.oldCellPosition!, self.getCellPosition())
}
self.zPosition = 0 self.zPosition = 0
} }
override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?){ override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?){
self.position = touches.first?.location(in: parent!) ?? CGPoint(x: 0, y: 0) self.position = touches.first?.location(in: parent!) ?? CGPoint(x: 0, y: 0)
} }

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="21754" systemVersion="22G91" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
<entity name="CDHistorique" representedClassName="CDHistorique" syncable="YES" codeGenerationType="class">
<attribute name="player1_name" optional="YES" attributeType="String"/>
<attribute name="player2_name" optional="YES" attributeType="String"/>
<attribute name="result" optional="YES" attributeType="String"/>
<attribute name="time" optional="YES" attributeType="String"/>
</entity>
<entity name="CDPlayer" representedClassName="CDPlayer" syncable="YES" codeGenerationType="class">
<attribute name="name" optional="YES" attributeType="String"/>
<attribute name="photo" optional="YES" attributeType="String"/>
</entity>
</model>

@ -10,9 +10,13 @@ import SwiftUI
@main @main
struct DouShouQi_AppApp: App { struct DouShouQi_AppApp: App {
// Create an instance of SettingsVM
@StateObject private var settingsVM = SettingsVM()
var body: some Scene { var body: some Scene {
WindowGroup { WindowGroup {
MainMenuView() MainMenuView()
.environmentObject(settingsVM)
} }
} }
} }

@ -0,0 +1,32 @@
//
// ChronoVM.swift
// DouShouQi_App
//
// Created by étudiant on 24/06/2024.
//
import SwiftUI
import Combine
class ChronometerViewModel: ObservableObject {
@Published var elapsedTime: TimeInterval = 0
private var timer: AnyCancellable?
func startTimer() {
let startDate = Date()
timer = Timer.publish(every: 1, on: .main, in: .common).autoconnect().sink { _ in
self.elapsedTime = Date().timeIntervalSince(startDate)
}
}
func stopTimer() {
timer?.cancel()
}
func formattedTime() -> String {
let minutes = Int(elapsedTime) / 60
let seconds = Int(elapsedTime) % 60
return String(format: "%02d:%02d", minutes, seconds)
}
}

@ -0,0 +1,50 @@
//
// GameVM.swift
// DouShouQi_App
//
// Created by Rémi REGNAULT on 29/05/2024.
//
import Foundation
import SwiftUI
import DouShouQiModel
class GameVM: ObservableObject, Identifiable {
// Properties
var game: Game
// Computed Properties
public var player1Name: String {
return game.players[.player1]?.name ?? "P1"
}
public var player2Name: String {
return game.players[.player2]?.name ?? "P2"
}
public var gameStatus: String {
if let lastMove = game.rules.historic.last {
let (_, result) = game.rules.isGameOver(withBoard: game.board,
andLastRowPlayed: lastMove.rowDestination,
andLastColumnPlayer: lastMove.columnDestination)
switch result {
case .notFinished:
return "Not Finished"
case .even:
return "Draw"
case .winner(let winningPlayer, _):
return "Winner: \(winningPlayer)"
@unknown default:
return "Not Started"
}
} else {
return "Not Started"
}
}
// Init
init(withGame game: Game, time: String) {
self.game = game
}
}

@ -0,0 +1,39 @@
//
// HistoricListVM.swift
// DouShouQi_App
//
// Created by étudiant on 24/06/2024.
//
import Foundation
import SwiftUI
import DouShouQiModel
class HistoricListVM: ObservableObject {
@Published var historicList: [HistoricVM]
public func SavePlayer(historic: HistoricVM){
historicList.append(historic)
CoreDataManager.shared.saveHistorique(historique: historic)
}
public func getAllHistoric() -> [HistoricVM]{
let coreDataPlayers = CoreDataManager.shared.fetchHistoriques()
self.historicList = coreDataPlayers.map { HistoricVM(historic: $0.toModel()) }
return historicList
}
public func groupByDate() -> [String: [HistoricVM]] {
let groupedDictionary = Dictionary(grouping: historicList) { historicVM in
return historicVM.date
}
return groupedDictionary
}
init() {
historicList = []
historicList = getAllHistoric()
}
}

@ -0,0 +1,33 @@
//
// HistoricVM.swift
// DouShouQi_App
//
// Created by Rémi REGNAULT on 29/05/2024.
//
import Foundation
import SwiftUI
import DouShouQiModel
class HistoricVM: ObservableObject, Identifiable, Hashable{
public static func == (lhs: HistoricVM, rhs: HistoricVM) -> Bool {
return lhs.id == rhs.id
}
public func hash(into hasher: inout Hasher) {
hasher.combine(id)
}
@Published var historic: Historique
var date: String {
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
return dateFormatter.string(from: Date())
}
init(historic: Historique) {
self.historic = historic
}
}

@ -0,0 +1,136 @@
//
// PlayingGameVM.swift
// DouShouQi_App
//
// Created by Rémi REGNAULT on 21/06/2024.
//
import Foundation
import SwiftUI
import DouShouQiModel
class PlayingGameVM: ObservableObject {
// Properties
@Published var game: Game
// Computed properties
public var currentPlayerName: String { game.players[game.rules.getNextPlayer()]?.name ?? (game.rules.getNextPlayer() == .player1 ? "P1" : "P2") }
public var lastMove: String {
if let move: Move = game.rules.historic.last {
return "\(move.columnDestination).\(move.rowDestination)"
}
else {
return ""
}
}
public var lastPieceMoved: String {
if let move: Move = game.rules.historic.last {
return game.board.grid[move.rowDestination][move.columnDestination].piece?.animal.symbol ?? ""
} else {
return ""
}
}
public var currentPlayerColor: UIColor {
return game.rules.getNextPlayer() == .player1 ? Colors.MeepleP1! : Colors.MeepleP2!
}
public var winner: String {
guard self.game.isOver else {
return ""
}
guard let lastMove: Move = self.game.rules.historic.last else {
return ""
}
guard let winner: DouShouQiModel.Player = game.players[lastMove.owner] else {
return ""
}
return winner.name
}
// Inits
init(withGame game: Game) {
self.game = game
}
init?(withRules rules: Rules, andPlayer1 p1: DouShouQiModel.Player, andPlayer2 p2: DouShouQiModel.Player) {
do {
self.game = try Game(withRules: rules, andPlayer1: p1, andPlayer2: p2)
self.game.addInvalidMoveCallbacksListener { _, move, player, result in
if result {
return
}
print("**************************************")
print("⚠️⚠️⚠️⚠️ Invalid Move detected: \(move) by \(player.name) (\(player.id))")
print("**************************************")
}
self.game.addGameOverListener { board, result, player in
switch(result){
case .notFinished:
print("⏳ Game is not over yet!")
case .winner(winner: let o, reason: let r):
print(board)
print("**************************************")
print("Game Over!!!")
print("🥇🏆 and the winner is... \(o == .player1 ? "🟡" : "🔴") \(player?.name ?? "")!")
switch(r){
case .denReached:
print("🪺 the opponent's den has been reached.")
case .noMorePieces:
print("🐭🐱🐯🦁🐘 all the opponent's animals have been eaten...")
case .noMovesLeft:
print("⛔️ the opponent can not move any piece!")
case .tooManyOccurences:
print("🔄 the opponent seem to like this situation... but enough is enough. Sorry...")
default:
print("Reason unknown...")
}
print("**************************************")
default:
break
}
}
} catch {
print("Error")
return nil
}
}
// Customs funcs
func onMeepleMove(_ sender: SpriteMeeple, _ start: CGPoint, _ end: CGPoint) {
let owner = game.rules.getNextPlayer()
let player: DouShouQiModel.Player = game.players[owner]!
let move = Move(of: owner, fromRow: Int(start.y), andFromColumn: Int(start.x), toRow: Int(end.y), andToColumn: Int(end.x))
if (game.rules.isMoveValid(onBoard: game.board, withMove: move)) {
print("Meeple moved = ", start, " -> ", end)
Task {
try! await (player as! HumanPlayer).chooseMove(move)
}
self.objectWillChange.send()
} else {
sender.cellPosition = start
sender.cellPosition = start
}
}
public func start() {
Task {
try await self.game.start()
}
}
}

@ -0,0 +1,53 @@
//
// PlayerExtension.swift
// DouShouQi_App
//
// Created by étudiant on 04/06/2024.
//
import Foundation
import DouShouQiModel
public class PlayerVM: ObservableObject, Identifiable, Hashable{
public static func == (lhs: PlayerVM, rhs: PlayerVM) -> Bool {
return lhs.id == rhs.id
}
public func hash(into hasher: inout Hasher) {
hasher.combine(id)
}
@Published var player: Player
var loose: Int {
return CoreDataManager.shared.countDefeats(for: player.name)
}
var win: Int {
return CoreDataManager.shared.countVictories(for: player.name)
}
var rank: Int {
let allPlayers = CoreDataManager.shared.fetchPlayers()
let allPlayerVMs = allPlayers.map { PlayerVM(player: $0.toModel()) }
let sortedPlayers = allPlayerVMs.sorted { $0.win > $1.win }
if let rankIndex = sortedPlayers.firstIndex(where: { $0.player.name == self.player.name }) {
return rankIndex + 1
}
return 0
}
//public func getPlayer(name: String): PlayerVM{}
init(player: Player) {
self.player = player
}
convenience init() {
self.init(player: Player(name: "IA", photo: ""))
}
}

@ -0,0 +1,58 @@
//
// PlayersVM.swift
// DouShouQi_App
//
// Created by étudiant on 12/06/2024.
//
import Foundation
import DouShouQiModel
import CoreData
import Combine
public class PlayersVM: ObservableObject{
@Published var players: [PlayerVM]
public func SavePlayer(player: PlayerVM){
players.append(player)
CoreDataManager.shared.savePlayer(playerVM: player)
}
public func contains(where predicate: (PlayerVM) -> Bool) -> Bool {
return players.contains(where: predicate)
}
public func getAllPlayer() -> [PlayerVM]{
let coreDataPlayers = CoreDataManager.shared.fetchPlayers()
self.players = coreDataPlayers.map { PlayerVM(player: $0.toModel()) }
return players
}
func refreshPlayers() {
let cdPlayers = CoreDataManager.shared.fetchPlayers()
players = cdPlayers.map { PlayerVM(player: Player(name: $0.name ?? "", photo: $0.photo ?? "")) }
}
func updatePlayer(playerVM: PlayerVM, playerName: String) {
if let index = players.firstIndex(where: { $0.player.name == playerName }) {
players[index] = playerVM
CoreDataManager.shared.saveContext()
refreshPlayers()
}
}
static func fetchTopPlayers(limit: Int = 10) -> [PlayerVM] {
let players = CoreDataManager.shared.fetchPlayers().map { PlayerVM(player: $0.toModel()) }
let sortedPlayers = players.sorted { $0.win > $1.win }
return Array(sortedPlayers.prefix(limit))
}
init() {
players = []
players = getAllPlayer()
}
}

@ -0,0 +1,18 @@
//
// SettingsVM.swift
// DouShouQi_App
//
// Created by Rémi REGNAULT on 30/05/2024.
//
import Foundation
import SwiftUI
class SettingsVM: ObservableObject {
// Properties
@Published var darkTheme: Bool = false
@Published var language: Language = Language.english
@Published var soundOn: Bool = true
init() {}
}

@ -1,31 +1,70 @@
//
// MainMenuView.swift
// DouShouQi_App
//
// Created by Nathan Verdier on 26/05/2024.
//
import SwiftUI import SwiftUI
import SpriteKit import SpriteKit
import DouShouQiModel
struct GameView: View { struct GameView: View {
var gameScene : GameScene = GameScene(size: CGSize(width: 700, height: 900))
@StateObject var gameVM: PlayingGameVM
@StateObject var chronoVM = ChronometerViewModel()
@Binding var isDisplayed: Bool
@Binding var parentIsDisplayed: Bool
@StateObject var historicVm = HistoricListVM()
var body: some View { var body: some View {
VStack { ZStack {
TopGameBoard().frame(maxHeight: 200) VStack {
SpriteView(scene: gameScene) TopGameBoard(gameVM: gameVM, chronoVM: chronoVM).frame(maxHeight: 200)
} SpriteView(scene: GameScene(size: CGSize(width: 700, height: 900), gameVM: gameVM))
.onAppear { }
MusicPlayer.shared.playBackgroundMusic(music: "GameMusic") .onAppear {
playSound(named: "Fight")
chronoVM.startTimer()
DispatchQueue.main.asyncAfter(deadline: .now() + 0.7) {
MusicPlayer.shared.playBackgroundMusic(music: "GameMusic")
}
}
.onDisappear {
MusicPlayer.shared.stopBackgroundMusic()
}
if gameVM.game.isOver {
VStack(spacing: 20) {
Text("Game Over")
.font(.title)
.fontWeight(.bold)
Text("Winner: \(gameVM.winner)")
.font(.title2)
}
.padding()
.background(Colors.WinnerBackground)
.cornerRadius(15)
.shadow(radius: 10)
.padding()
.onAppear {
chronoVM.stopTimer()
saveHistoric()
Timer.scheduledTimer(withTimeInterval: 10, repeats: false) { _ in
isDisplayed = false
parentIsDisplayed = false
}
}
}
} }
.onDisappear { .onDisappear {
MusicPlayer.shared.stopBackgroundMusic() MusicPlayer.shared.stopBackgroundMusic()
} }
.navigationBarHidden(true)
} }
}
struct GameView_Previews: PreviewProvider { private func saveHistoric() {
static var previews: some View { let player1_name = gameVM.game.players[.player1]?.name
GameView() let player2_name = gameVM.game.players[.player2]?.name
let newHistoric = HistoricVM(historic: Historique(player1_name: player1_name ?? "", player2_name: player2_name ?? "", time: chronoVM.formattedTime(), result: gameVM.winner))
historicVm.SavePlayer(historic: newHistoric)
} }
} }

@ -1,32 +1,32 @@
//
// HistoricView.swift
// DouShouQi_App
//
// Created by Rémi REGNAULT on 21/05/2024.
//
import SwiftUI import SwiftUI
struct HistoricView: View { struct HistoricView: View {
@ObservedObject var historicListVM: HistoricListVM
var body: some View { var body: some View {
VStack { VStack {
TitlePageFrame(Text: "Historic", ImageWidth: 200, ImageHeight: 200) TitlePageFrame(Text: "Historic", ImageWidth: 200, ImageHeight: 200)
VStack { // Afficher chaque groupe de dates dans une section distincte
GameResumeFrame(Player1Name: "Remi", Player2Name: "Nathan", Status: "Winner: Nathan") ForEach(historicListVM.groupByDate().sorted(by: { $0.key > $1.key }), id: \.key) { key, historicVMs in
GameResumeFrame(Player1Name: "Rayhan", Player2Name: "Nathan", Status: "Winner: Nathan") VStack(alignment: .leading) {
GameResumeFrame(Player1Name: "Rayhan", Player2Name: "Rémi", Status: "Draw") Text(key) // Affiche la date comme titre de section
List(historicVMs) { historicVM in
GameResumeFrame(historicVm: historicVM)
}
}
.padding(.horizontal, 10)
} }
.padding(.horizontal, 10)
Spacer() Spacer()
} }
} }
} }
struct HistoricView_Previews: PreviewProvider { struct HistoricView_Previews: PreviewProvider {
static var previews: some View { static var previews: some View {
HistoricView() HistoricView(historicListVM: HistoricListVM())
} }
} }

@ -13,10 +13,20 @@ struct MainMenuView: View {
@State private var currentImage: String? @State private var currentImage: String?
@State private var timer: Timer? @State private var timer: Timer?
@State private var showImage = false @State private var showImage = false
let images: [String] = [AppImages.SemiLion, AppImages.SemiDog, AppImages.SemiRat, AppImages.SemiWolf, AppImages.SemiLeopard, AppImages.SemiElephant, AppImages.SemiCat]
@State var showSelectPlayer = false
@State var showHistoric = false
@State var showBestScores = false
@State var showPlayers = false
@State var showSettings = false
@State var showARKit = false
@StateObject var historicList = HistoricListVM()
let images: [String] = [AppImages.SemiLion, AppImages.SemiDog, AppImages.SemiRat, AppImages.SemiWolf, AppImages.SemiLeopard, AppImages.SemiElephant, AppImages.SemiCat] // Add your image names here
var body: some View { var body: some View {
NavigationView { NavigationStack {
VStack { VStack {
if showSplash { if showSplash {
SplashScreenView() SplashScreenView()
@ -36,13 +46,32 @@ struct MainMenuView: View {
VStack { VStack {
HStack { HStack {
VStack(spacing: 25) { VStack(spacing: 25) {
MainMenuButton(text: "Play", destination: SelectPlayerView(), sound: "TitleScreenButtonSound", topRightCorner: 10, bottomRightCorner: 10) MainMenuButton(text: "Play", sound: "TitleScreenButtonSound",onClick: { showSelectPlayer = true }, topRightCorner: 10, bottomRightCorner: 10)
MainMenuButton(text: "Historique", destination: HistoricView(), sound: "TitleScreenButtonSound", topRightCorner: 10, bottomRightCorner: 10) MainMenuButton(text: "Historique", sound: "TitleScreenButtonSound",onClick: { showHistoric = true }, topRightCorner: 10, bottomRightCorner: 10)
MainMenuButton(text: "Best Scores", destination: ScoreBoardView(), sound: "TitleScreenButtonSound", topRightCorner: 10, bottomRightCorner: 10) MainMenuButton(text: "Best Scores", sound: "TitleScreenButtonSound",onClick: { showBestScores = true }, topRightCorner: 10, bottomRightCorner: 10)
MainMenuButton(text: "Players", destination: PlayersView(), sound: "TitleScreenButtonSound", topRightCorner: 10, bottomRightCorner: 10) MainMenuButton(text: "Players", sound: "TitleScreenButtonSound",onClick: { showPlayers = true }, topRightCorner: 10, bottomRightCorner: 10)
MainMenuButton(text: "Settings", destination: SettingsView(), sound: "TitleScreenButtonSound", topRightCorner: 10, bottomRightCorner: 10) MainMenuButton(text: "Settings", sound: "TitleScreenButtonSound",onClick: { showSettings = true }, topRightCorner: 10, bottomRightCorner: 10)
MainMenuButton(text: "AR Start", destination: ARKitUIViewBoard(aRKitViewRepresentable: ARKitViewRepresentable()), sound: "TitleScreenButtonSound") MainMenuButton(text: "AR Kit Version", sound: "TitleScreenButtonSound", onClick: { showARKit = true }, topRightCorner: 10, bottomRightCorner: 10)
}
.navigationDestination(isPresented: $showSelectPlayer) {
SelectPlayerView(isDisplayed: $showSelectPlayer)
}
.navigationDestination(isPresented: $showHistoric) {
HistoricView(historicListVM: historicList)
} }
.navigationDestination(isPresented: $showBestScores) {
ScoreBoardView()
}
.navigationDestination(isPresented: $showPlayers) {
PlayersView()
}
.navigationDestination(isPresented: $showSettings) {
SettingsView()
}
.navigationDestination(isPresented: $showARKit) {
ARKitUIViewBoard(aRKitViewRepresentable: ARKitViewRepresentable())
}
if let currentImage = currentImage { if let currentImage = currentImage {
Image(currentImage) Image(currentImage)
.resizable() .resizable()

@ -7,15 +7,9 @@
import SwiftUI import SwiftUI
extension String : Identifiable {
public var id: Self { return self }
}
struct SettingsView: View { struct SettingsView: View {
@State private var theme = false @EnvironmentObject var settingsVM: SettingsVM
@State private var choice = "English"
@State private var sound = true
var body: some View { var body: some View {
VStack { VStack {
@ -30,7 +24,7 @@ struct SettingsView: View {
Spacer() Spacer()
CustomSwitchButton(IsOn: $theme, imgSystemNameIsOff: SystemIcons.LightTheme, imgSystemNameIsOn: SystemIcons.DarkTheme) CustomSwitchButton(IsOn: $settingsVM.darkTheme, imgSystemNameIsOff: SystemIcons.LightTheme, imgSystemNameIsOn: SystemIcons.DarkTheme)
} }
Divider() Divider()
@ -41,9 +35,9 @@ struct SettingsView: View {
Spacer() Spacer()
Picker("Sort", selection: $choice) { Picker("Language", selection: $settingsVM.language) {
ForEach(["English", "Français", "Español"]) { ForEach(Language.list) { language in
Text($0) Text(language.litteral).tag(language)
} }
} }
.pickerStyle(.menu) .pickerStyle(.menu)
@ -52,12 +46,12 @@ struct SettingsView: View {
Divider() Divider()
HStack { HStack {
Text("Theme") Text("Sound")
.font(.headline) .font(.headline)
Spacer() Spacer()
CustomSwitchButton(IsOn: $sound, imgSystemNameIsOff: SystemIcons.SoundOff, imgSystemNameIsOn: SystemIcons.SoundOn) CustomSwitchButton(IsOn: $settingsVM.soundOn, imgSystemNameIsOff: SystemIcons.SoundOff, imgSystemNameIsOn: SystemIcons.SoundOn)
} }
Divider() Divider()
@ -69,8 +63,8 @@ struct SettingsView: View {
} }
} }
struct SettingsView_Previews: PreviewProvider { //struct SettingsView_Previews: PreviewProvider {
static var previews: some View { // static var previews: some View {
SettingsView() // SettingsView()
} // }
} //}

@ -0,0 +1,90 @@
//
// EditPlayerView.swift
// DouShouQi_App
//
// Created by étudiant on 17/06/2024.
//
import Foundation
import SwiftUI
struct EditPlayerView: View {
@Binding var isPresented: Bool
@ObservedObject var player: PlayerVM
@ObservedObject var playersVM: PlayersVM
@State private var profileImage: UIImage? = nil
@State private var showImagePicker = false
@State private var imagePickerSourceType: UIImagePickerController.SourceType = .photoLibrary
var playerName: String
var body: some View {
VStack(spacing: 20) {
Text("Edit Player")
.font(.headline)
TextField("Player Name", text: $player.player.name)
.padding()
.background(Color(.systemGray6))
.cornerRadius(10)
if let profileImage = profileImage {
Image(uiImage: profileImage)
.resizable()
.frame(width: 100, height: 100)
.clipShape(Circle())
} else {
Button(action: {
showImagePicker = true
}) {
Text("Select Profile Photo")
.foregroundColor(.white)
.padding()
.background(Color.blue)
.cornerRadius(10)
}
}
HStack {
Button(action: {
if let image = profileImage, let imageData = image.jpegData(compressionQuality: 0.8) {
let filename = UUID().uuidString + ".jpg"
let paths = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)
let documentsDirectory = paths[0]
let fileURL = documentsDirectory.appendingPathComponent(filename)
try? imageData.write(to: fileURL)
player.player.photo = fileURL.path
}
playersVM.updatePlayer(playerVM: player, playerName: playerName)
isPresented = false
}) {
Text("Save")
.foregroundColor(.white)
.padding()
.background(Color.blue)
.cornerRadius(10)
}
Button(action: {
isPresented = false
}) {
Text("Cancel")
.foregroundColor(.white)
.padding()
.background(Color.red)
.cornerRadius(10)
}
}
}
.padding()
.frame(maxWidth: 300)
.background(Color.white)
.cornerRadius(20)
.shadow(radius: 10)
.sheet(isPresented: $showImagePicker) {
ImagePicker(image: $profileImage, sourceType: imagePickerSourceType)
}
}
}

@ -8,51 +8,40 @@
import Foundation import Foundation
import SwiftUI import SwiftUI
// Modèle de données pour un joueur
struct Player: Identifiable {
var id = UUID()
var name: String
var wins: Int
var losses: Int
var photo: String
}
// Exemple de vue pour l'interface utilisateur des joueurs
struct PlayersView: View { struct PlayersView: View {
// Liste de joueurs pour l'exemple
@State private var players = [ @StateObject var playersVM = PlayersVM()
Player(name: "Rayhan", wins: 7, losses: 6, photo: "shrek"), @State var searchText = ""
Player(name: "Remi", wins: 7, losses: 2, photo: "shrek"), @State var showingPopup = false
Player(name: "Nathan", wins: 14, losses: 5, photo: "shrek") @State var newPlayerName = ""
]
var filteredPlayers: [PlayerVM] {
@State private var searchText = ""
@State private var showingPopup = false
@State private var newPlayerName = ""
var filteredPlayers: [Player] {
if searchText.isEmpty { if searchText.isEmpty {
return players return playersVM.players
} else { } else {
return players.filter { $0.name.lowercased().contains(searchText.lowercased()) } return playersVM.players.filter { $0.player.name.lowercased().contains(searchText.lowercased()) }
}
}
var groupedPlayers: [String: [PlayerVM]] {
Dictionary(grouping: filteredPlayers) { player in
String(player.player.name.prefix(1)).uppercased()
} }
} }
var body: some View { public var body: some View {
NavigationView { NavigationView {
VStack { VStack {
TitlePageFrame(Text: "PLAYERS", ImageWidth: 200, ImageHeight: 200) TitlePageFrame(Text: "PLAYERS", ImageWidth: 200, ImageHeight: 200)
SearchBar(text: $searchText) SearchBar(text: $searchText)
.padding(.horizontal) .padding(.horizontal)
List { List {
ForEach(groupedPlayers.keys.sorted(), id: \.self) { key in ForEach(groupedPlayers.keys.sorted(), id: \.self) { key in
Section(header: Text(key)) { Section(header: Text(key)) {
ForEach(groupedPlayers[key]!) { player in ForEach(groupedPlayers[key]!, id: \.self) { player in
PlayerRow(player: player, players: $players) PlayerRow(player: player, players: playersVM)
} }
} }
} }
@ -72,20 +61,13 @@ struct PlayersView: View {
} }
.padding(.bottom) .padding(.bottom)
.sheet(isPresented: $showingPopup) { .sheet(isPresented: $showingPopup) {
AddPlayerView(isPresented: $showingPopup, players: $players) AddPlayerView(isPresented: $showingPopup, playersVM: playersVM)
} }
} }
} }
} }
var groupedPlayers: [String: [Player]] {
Dictionary(grouping: filteredPlayers) { player in
String(player.name.prefix(1)).uppercased()
}
}
} }
// Vue pour la barre de recherche
struct SearchBar: UIViewRepresentable { struct SearchBar: UIViewRepresentable {
@Binding var text: String @Binding var text: String
@ -116,9 +98,8 @@ struct SearchBar: UIViewRepresentable {
} }
} }
struct PlayersView_Previews: PreviewProvider {
struct PlayersPageView_Previews: PreviewProvider {
static var previews: some View { static var previews: some View {
PlayersView() PlayersView(playersVM: PlayersVM())
} }
} }

@ -1,14 +1,9 @@
//
// ScoreBoardView.swift
// DouShouQi_App
//
// Created by Rémi REGNAULT on 21/05/2024.
//
import SwiftUI import SwiftUI
import DouShouQiModel import DouShouQiModel
struct ScoreBoardView: View { struct ScoreBoardView: View {
@State private var topPlayers: [PlayerVM] = []
var body: some View { var body: some View {
VStack { VStack {
HStack { HStack {
@ -39,14 +34,23 @@ struct ScoreBoardView: View {
.frame(height: 2) .frame(height: 2)
} }
PlayerScoreResumeFrame(Name: "Nathan Verdier", Rank: 1, Wins: 19, Looses: 15) ForEach(topPlayers.indices, id: \.self) { index in
PlayerScoreResumeFrame(Name: "Rayhan Hassou", Rank: 2, Wins: 17, Looses: 17) let player = topPlayers[index]
PlayerScoreResumeFrame(Name: "Rémi Regnault", Rank: 3, Wins: 15, Looses: 19) PlayerScoreResumeFrame(
Name: player.player.name,
Rank: index + 1,
Wins: player.win,
Looses: player.loose
)
}
} }
Spacer() Spacer()
} }
.padding(10) .padding(10)
.onAppear {
topPlayers = PlayersVM.fetchTopPlayers()
}
} }
} }

@ -6,33 +6,63 @@
// //
import SwiftUI import SwiftUI
import SpriteKit
import DouShouQiModel
struct SelectPlayerView: View { struct SelectPlayerView: View {
@StateObject var player1 = PlayerVM()
@StateObject var player2 = PlayerVM()
@Binding var isDisplayed: Bool
@State var gameIsPlaying: Bool = false
@State var gameSettings: Bool = false
var body: some View { var body: some View {
VStack { VStack {
TitlePageFrame(Text: "select players") TitlePageFrame(Text: "select players")
Spacer() Spacer()
SelectPlayerButtonView() SelectPlayerButtonView(player1: player1, player2: player2, playersVM: PlayersVM())
Spacer() Spacer()
HStack { HStack {
VStack(alignment: .trailing) VStack(alignment: .trailing)
{ {
MainMenuButton(text: "Start", destination: GameView(), sound: "TitleScreenButtonSound", horizontalAlignment: .trailing, topLeftCorner: 10, bottomLeftCorner: 10) MainMenuButton(text: "Start", sound: "Start", onClick: {gameIsPlaying = true}, horizontalAlignment: .trailing, topLeftCorner: 10, bottomLeftCorner: 10)
MainMenuButton(text: "Settings", destination: ContentView(), sound: "TitleScreenButtonSound", horizontalAlignment: .trailing, topLeftCorner: 10, bottomLeftCorner: 10) MainMenuButton(text: "Settings", sound: "TitleScreenButtonSound", onClick: { gameSettings = true }, horizontalAlignment: .trailing, topLeftCorner: 10, bottomLeftCorner: 10)
}
.navigationDestination(isPresented: $gameIsPlaying) {
GameView(gameVM: PlayingGameVM(withRules: ClassicRules(), andPlayer1: HumanPlayer(withName: player1.player.name, andId: .player1)!, andPlayer2: HumanPlayer(withName: player2.player.name, andId: .player2)!)!,isDisplayed: $gameIsPlaying, parentIsDisplayed: $isDisplayed)
}
.navigationDestination(isPresented: $gameSettings) {
ContentView()
} }
} }
Spacer() Spacer()
} }
.onAppear {
playSound(named: "SelectFighterSound")
//MusicPlayer.shared.playBackgroundMusic(music: "GameMusic")
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
MusicPlayer.shared.playBackgroundMusic(music: "TitleScreenMusic")
}
}
.onDisappear {
MusicPlayer.shared.stopBackgroundMusic()
}
} }
} }
struct SelectPlayerViewPreviews: PreviewProvider { /*struct SelectPlayerViewPreviews: PreviewProvider {
static var previews: some View { static var previews: some View {
SelectPlayerView() SelectPlayerView()
} }
} }*/

Loading…
Cancel
Save