Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
silverweed committed Oct 2, 2017
1 parent 2b5e1ef commit 8a8238a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions behavioral/memento.cr
Expand Up @@ -44,9 +44,12 @@ class Match
end

match = Match.new("Liu Kang", "Kano", 3, 60.seconds)
# Save the current state
previousMatchState = match.saveMemento
# Change the state
match.rounds = 5
match.fighters = {"Sonya Blade", "Goro"}
match.start
# Restore the previous state
match.restoreMemento(previousMatchState)
match.start

0 comments on commit 8a8238a

Please sign in to comment.