codewords icon indicating copy to clipboard operation
codewords copied to clipboard

[enhancement/possibly fork as new game] Codenames: Duet - cooperative mode

Open fdenzer opened this issue 5 years ago • 3 comments

I am willing to help code the cooperative mode for this.

(Python3/flask and Vue(x) i can do. Unit testing is not my strong suite, though.)

Any ideas on where to start?

PM or chat room invitations welcome. (For now, I can work on this project on three days this week (CW10 of 2019), from 21:30-23:30 hours in UTC+1 hour zone.)

fdenzer avatar Mar 04 '19 21:03 fdenzer

Could you give more details on what co-op mode entails? I'm not familiar with this version of the game.

jporter-dev avatar Mar 04 '19 21:03 jporter-dev

Rules

Both players are on allied teams, lets call that faction 'green', as its agents are colored that way. Both players take turns giving a clue (codeword plus number), with the other team guessing at least once, with no upper limit.

Creation of cue cards is kind of complicated, since they must fulfill a certain matching rules (see 4.)

Rules for cue cards are:

  1. A team consists of at least one player and is allowed to view only one side of the cue card. There are two teams.
  2. There are 3 assassins on each side of the cue card.
  3. There are 9 green agents on each side of the cue card.
  4. There are 7 civilians on each side of the cue card.
  5. one assassin, three agents and seven civilians overlap. See the visual guide in the following pdf for a visual explanation.

The complete rules are available here on CGE. For players with experience in Codenames the last page should contain all rules, I would put an emphasis on the last diagram though: SECRETS OF THE KEY CARD shows the difference of duet cue cards to versus-game cue cards.

Game setup is done with 25 code words in 5x5 grid as usual.

Other apps that do duet generation

  • http://codenames.markgatesman.com/ Browser-based, identical seeds for both teams views of cue cards need to be put in a textbox, manually. Source code is un-obfuscated JavaScript, and duet-generation seems to be less than 20 LoC 🤔.

  • https://boardgamegeek.com/thread/1410788/codenames-helper-app Android app, I found no source code, but 'includes 500 duet code cards' is not in-app generation anyway.

  • FYI: The codename gadget mobile app just generates regular cue cards, but no duet cards. Bummer.

fdenzer avatar Mar 05 '19 10:03 fdenzer

Ah interesting - I've never tried this variant of Codenames. From what I understand, implementing this mode would just require tracking "timer tokens" and modifying the game board generation to show only one team color and to generate two "layouts" of the same words.

It shouldn't be overly difficult to do, it'll definitely need some additional logic on the client and possibly the server to handle the two players. If you wanted to give it a shot I'd be open to merging this in and helping out when needed.

jporter-dev avatar Mar 05 '19 15:03 jporter-dev