Closed metalalive closed 10 months ago
- Domain models
Game
id
, identifier could be generated in UUID format ?
assign_character()
, ensure each player selected different investigator, hash table can do this well, or any other option ?
我認為hash table是好選擇
Player
- is it good idea to bind
Player
instances to specificGame
instance ?
我認為ok, 這隱含假設一位玩家同一時間只能進行一場遊戲
In-memory repository
InMemoryRepository.save()
, use hash table to store key (game ID) value (relevantGame
instance) pairs ?
感覺ok, 沒有其他更好的想法
目的單純僅需要隨機選v4 (執行效率考量) 需要用作資料庫索引或時間排序用途選v7 在我們case v4足夠使用了
我之前讀過 RFC 4122 文件 + 相關的 draft released this year, v4 ,v7 兩者都OK, 先用v4也可以
之後實作用db的話,我建議直接用db的id()
之後我將在 GitHub discussion 中開一個討論, 看要使用哪個資料庫 (e.g. MongoDB, PostgreSQL, any other Non-relational database)
Teds 你能處理這個Issue嗎 ? 目前我正在處理另一個 Issue #19 , 修改完 open API 規格後, 我將開始寫 code 加入一些 API endpoints 供玩家在遊戲開始前進行其他設定 (主要是在 Miro page 中記錄的 endpoints)
我的想法是, backend dev 可以同時工作 / 完成一些事情 這你ok嗎 ? 謝謝
Teds 你能處理這個Issue嗎 ?
ok, 不過今天比較忙,我明天處理
The issue #10 has been completed.
According to the functions declared in the repository and domain models , we need someone to implement the detail .
Game
add_players()
, ensure total number of players won't exceed the limit (at most 4 people)id
, identifier could be generated in UUID format ?assign_character()
, ensure each player selected different investigator, hash table can do this well, or any other option ?Player
Player
instances to specificGame
instance ?InMemoryRepository.save()
, use hash table to store key (game ID) value (relevantGame
instance) pairs ?