-
Notifications
You must be signed in to change notification settings - Fork 0
/
data-structure.json
50 lines (46 loc) · 1.79 KB
/
data-structure.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
This file is not meant to ever be used, but rather to define the
data and structure of it in a json format.
This tamogachi will start out simple and become more complex.
As such I will include certain fields in the data structure
that will not be used initially but may be used in the future.
Required Features:
- Hunger: time since last command executes
- Sleep: because implementing a time-based sleep is hard I will make sleep
something that occurs randomly and then lasts for X invocations of the program.
sleep_left should be reset every time the program determines it should be sleeping.
then, on every invocation if sleeping == true decrement sleep_left by one
- Energy: number of commands run. the commandsRunPerDay tracks how many times
the program has been invoked per day. energy = 0 at 0 invocations and slowly
rises up with 1000 invocations being max energy
- Levels: based on the number of commands run and age of the tamogachi
it will level up over time
- Small data structure, (in/de)crement values instead of storing continuous records
- Moods: arbitrary moods that last 30-60 minutes (could be based on weather)
- Pet Characteristics: age, name, level, owner,
personality (idk how i would make this relevant
when actually interacting with it),
favourite activities,
skills,
colour / breed,
health
Here is the data structure:
{
"name": "Yoshi",
"age": 23,
"level": 0,
"owner": "Mario",
"personality": "energetic",
"colour": "green",
"breed": "dinosaur",
"health": "great shape",
"hunger": 0,
"sleeping": false,
"sleep_left": 0,
"energy": 0,
"commands_run_per_day": [
{
"day": "19122023",
"commands_run": 0
}
]
}