---
# System prepended metadata

title: Informal Module Notes

---

# Informal Module Notes

## Controller Modules
### Module 1: BatterySessionManagement Module ()
Purpose: This module controls the entire game

LocalStorage: data = new BatterySessionData()

We need:
1. A unique ID for the session that is about to be played
2. Know which User is playing
    3. data[User] = getUserData()
4. Know the order that the mini games will be played
    4. For each mini game m,
        5. m.init()
        6. m.getInstructions()
        7. data[MiniGame].append(m.play())
        8. We need to store this mini-game data
7. Store the data in Elasticsearch


### MiniGame Interface (all mini games have these methods)
1. init
2. getInstructions()
3. when finished returns MiniGameData <- play()

### Mini Game Module Example: Circles


## Data-only Modules
### BatterySessionData
1. SessionId (natural number, random) - unique (primary key)
    2. If you know the session ID, you can ask Elasticsearch to return this object
2. User UserData
3. MiniGameData: [MiniGameData]


### UserData
1. UserId Natural Number (unique, think MacId)
2. FirstName String
3. LastName String
4. Age? Gender? ...

# CirclesData : MiniGameData
1. OriginPoint: 3DPoint
2. DestinationPoint: 3DPoint
3. DestinationTime: Float

Assumption: DestinationTime is in milliseconds

