Verse Library verse

04 Fragment

Shows how to declare constant values versus mutable variables for dynamic game state.

verse-library/the-grammar-of-verse/04-fragment.verse

# A constant — decided once, never changes during play
WinningScore : int = 10

# A variable — can change while the game runs
var CurrentScore : int = 0

Comments

    Sign in to vote, comment, or suggest an edit. Sign in