mirror of
https://github.com/LHY0125/Gobang-Game.git
synced 2026-06-29 00:45:55 +08:00
feat: GameConfig 新增 hostPort 字段
- Rust GameConfig 添加 host_port: u16(#[serde(default)],默认 0) - TypeScript GameConfig 添加 hostPort?: number(可选,匹配其他带默认值字段的模式)
This commit is contained in:
@@ -122,6 +122,8 @@ pub struct GameConfig {
|
||||
#[serde(default)]
|
||||
pub remote_address: String,
|
||||
#[serde(default)]
|
||||
pub host_port: u16,
|
||||
#[serde(default)]
|
||||
pub use_llm: bool,
|
||||
#[serde(default)]
|
||||
pub llm_endpoint: String,
|
||||
@@ -142,6 +144,7 @@ impl Default for GameConfig {
|
||||
player_color: Color::Black,
|
||||
is_server: false,
|
||||
remote_address: String::new(),
|
||||
host_port: 0,
|
||||
use_llm: false,
|
||||
llm_endpoint: String::new(),
|
||||
llm_api_key: String::new(),
|
||||
|
||||
@@ -20,6 +20,7 @@ export interface GameConfig {
|
||||
playerColor: Color;
|
||||
isServer: boolean;
|
||||
remoteAddress: string;
|
||||
hostPort?: number;
|
||||
useLlm?: boolean;
|
||||
llmEndpoint?: string;
|
||||
llmApiKey?: string;
|
||||
|
||||
Reference in New Issue
Block a user