KonstantinKlepikov / cold-war-boardgame

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Backend: add game processor for calculate game logics

chemeshuggah opened this issue · comments

  • import bgameb
  • GameProcessor class to manipulate with game logics
  • add field current_deck to db - this is a names of current cards in deck
  • add deck and shakers
  • get_cards_name to crud.cards
  • create GameProcessor when we create new game
    • reade data from db
    • create game
    • init players
    • create deck
    • deal
    • get deal list
    • deal decks at the start the game and shuffle it
  • read deck states and make GameProcessor from deck states
  • init deal deck by this data
  • check phase condition after push and deal some things in auto
  • check phase condition before push and raise if something not right
  • pop mission card
  • store to db