Profvis

Menulis Kode R yang Efisien

Colin Gillespie

Jumping Rivers & Newcastle University

Monopoly

  • 40 squares
    • 28 properties (22 streets + 4 stations + 2 utilities)
      • Players take turns moving by rolling dice
    • Buying properties
    • Charging other players
      • Sent to jail: three consecutive doubles in a single turn

Menulis Kode R yang Efisien

Monopoly Code

  • Around 100 lines of code
    • Simplified game
      • Reject the capitalist system: no money
      • No friends, only 1 player
    • simulate_monopoly(no_of_rolls)
Menulis Kode R yang Efisien

Menulis Kode R yang Efisien

Menulis Kode R yang Efisien

Monopoly profvis

How would you optimize this code?

Menulis Kode R yang Efisien

Let's practice!

Menulis Kode R yang Efisien

Preparing Video For Download...