parent
d771a3daaf
commit
806840e84e
@ -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>
|
|
Binary file not shown.
@ -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>
|
|
||||||
|
|
||||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -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 {}
|
|
Binary file not shown.
@ -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
|
|
||||||
}
|
|
Binary file not shown.
@ -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>
|
|
||||||
|
|
||||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -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 {}
|
|
Binary file not shown.
@ -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 {}
|
|
File diff suppressed because it is too large
Load Diff
@ -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 {}
|
|
Binary file not shown.
@ -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 +0,0 @@
|
|||||||
Versions/Current/DouShouQiModel
|
|
@ -1 +0,0 @@
|
|||||||
Versions/Current/Headers
|
|
@ -1 +0,0 @@
|
|||||||
Versions/Current/Modules
|
|
@ -1 +0,0 @@
|
|||||||
Versions/Current/Resources
|
|
Binary file not shown.
@ -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>
|
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -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 {}
|
|
Binary file not shown.
@ -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 {}
|
|
File diff suppressed because it is too large
Load Diff
@ -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 {}
|
|
Binary file not shown.
@ -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>
|
|
@ -1 +0,0 @@
|
|||||||
A
|
|
@ -0,0 +1,22 @@
|
|||||||
|
//
|
||||||
|
// ARBoard.swift
|
||||||
|
// DouShouQi_App
|
||||||
|
//
|
||||||
|
// Created by Nathan Verdier on 24/06/2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import RealityKit
|
||||||
|
|
||||||
|
class ARBoard: Entity {
|
||||||
|
|
||||||
|
required init(image: String) {
|
||||||
|
super.init()
|
||||||
|
if let boardEntity = try? Entity.load(named: image) {
|
||||||
|
self.addChild(boardEntity)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@MainActor required init() {
|
||||||
|
fatalError("init() has not been implemented")
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
//
|
||||||
|
// ARKitUIViewBoard.swift
|
||||||
|
// DouShouQi_App
|
||||||
|
//
|
||||||
|
// Created by etudiant on 24/06/2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
import DouShouQiModel
|
||||||
|
|
||||||
|
struct ARKitUIViewBoard: UIViewRepresentable {
|
||||||
|
|
||||||
|
var aRKitViewRepresentable: ARKitViewRepresentable
|
||||||
|
|
||||||
|
func makeUIView(context: Context) -> ARKitViewRepresentable {
|
||||||
|
return aRKitViewRepresentable
|
||||||
|
}
|
||||||
|
|
||||||
|
func updateUIView(_ uiView: ARKitViewRepresentable, context: Context) {}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,44 @@
|
|||||||
|
//
|
||||||
|
// ARKitViewRepresentable.swift
|
||||||
|
// DouShouQi_App
|
||||||
|
//
|
||||||
|
// Created by etudiant on 24/06/2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
import ARKit
|
||||||
|
import RealityKit
|
||||||
|
import DouShouQiModel
|
||||||
|
|
||||||
|
class ARKitViewRepresentable: ARView {
|
||||||
|
|
||||||
|
required init(frame frameRect: CGRect) {
|
||||||
|
super.init(frame: frameRect)
|
||||||
|
}
|
||||||
|
|
||||||
|
@MainActor required init?(coder decoder: NSCoder) {
|
||||||
|
fatalError("init(coder:) not implemented")
|
||||||
|
}
|
||||||
|
|
||||||
|
convenience init(imageBoard: String = "board", cell_size: Float = 0.1145) {
|
||||||
|
self.init(frame: UIScreen.main.bounds)
|
||||||
|
do {
|
||||||
|
let game = try Game(withRules: ClassicRules(), andPlayer1: HumanPlayer(withName: "Player 1", andId: .player1)!, andPlayer2: HumanPlayer(withName: "Player 2", andId: .player2)!)
|
||||||
|
initBoard(withBoard: game.board, andImage: imageBoard)
|
||||||
|
} catch {
|
||||||
|
print("error")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func applyConfiguration() {
|
||||||
|
let conf = ARWorldTrackingConfiguration()
|
||||||
|
self.session.run(conf)
|
||||||
|
}
|
||||||
|
|
||||||
|
func initBoard(withBoard board: Board, andImage image: String) {
|
||||||
|
let anchor = AnchorEntity(.plane(.horizontal, classification: .any, minimumBounds: SIMD2<Float>(1, 1)))
|
||||||
|
let arBoard = ARBoard(image: image)
|
||||||
|
anchor.addChild(arBoard)
|
||||||
|
self.scene.addAnchor(anchor)
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue