Mode:
Duration:
1
2
3
4
5
6
7
8
9
10
11
module 0x1::Points {
resource struct Score { value: u64 }
public fun new(): Score {
Score { value: 0 }
}
public fun add(score: &mut Score, pts: u64) {
score.value = score.value + pts
}
}Coding works best on desktop or with an external keyboard.