Bingo for meetings– working at sharing meeting with others–part 4

Bingo

Bingo is a small project, written in TypeScript , and developed with Alexandru Badita in launch break (one hour - more or less). You can find sources at https://github.com/alexandru360/PresentationBingoCards/ . Those are my blog posts for Bingo : ( scroll below for the post)
NrLink
1Create meeting
2Create Tests
3Finalize Create meeting
4Sharing meeting
5Keep Score
6Add obsolete
7Finalizing obsolete
8End meeting
9Dockerize tests
10Azure CI tests
11Yarn workspaces
12CLI
13Intermezzo - CLI improvements
14typescript compile run with node
15NestJS ,swagger and create a meeting
16Finalizing API
17Intermezzo - jest vs jasmine error
18Refactor WebAPI and test service
19Heroku Deploy NestJs
20Angular
21Deploy Angular to GitHub
22WebAPI and Web
23Documentation
24Documentation of the code
25Conclusions

Other use case for Bingo Meetings was Share meeting bingo(https://github.com/alexandru360/PresentationBingoCards/projects/1#card-24165765)

Share Meeting Bingo:

As a User, I can receive the meeting Id( url) . When going to this url , I can ( optionally) enter my name and check cards.

So how to implement this  ? A Meeting contains an array of Cards and a array of Participants. How a Participant can check cards ?

There are several solutions for this:

  1. The Participant can have an Id of the meeting, is going to some form of database( even in memory , like a singleton collection of Meetings), retrieve the meeting, retrieve the cards, check the card
  2. The participant raise an event ( PleaseCheckThisCardForMe) , the meeting listens and checks the meeting
  3. The participant have a real reference of the cards and checks the cards
  4. The meeting has a  CheckCardByParticipant that someone can call ( leaving the responsibility later  – maybe on API )

We ( me and Alexandru Badita we have choosed the latest solution. So we came with the following :


public CheckCardByParticipant(c: Cards , p:Participant){
        //TODO: verify participant is added first or add
        //TODO: verify card is added first
        c.CheckMe(p);
    }

and a test


import  MeetingsFactory from '../MeetingsFactory';
import Meeting from '../meeting';
describe('Check  card basic', () => {
    it('card should be checked', () => {
        const mf=new MeetingsFactory();
        const m1=mf.CreateMeeting("andrei","first meeting");
        console.log(m1.Cards.length);
        
        expect(m1.AllUnchecked()).toBe(true);
        m1.CheckCardByParticipant(m1.Cards[0], m1.Participants[0]);    
        expect(m1.AllUnchecked()).toBe(false);
        expect(m1.IsCardCheckedByParticipant(m1.Cards[0], m1.Participants[0])).toBe(true);
        
        
  
      })
    
  })
  

Obviously, from TODO, we have to put more code and more tests – but for the moment we think that nobody will want to break our application on purpose….