Skip to content

Instantly share code, notes, and snippets.

@vikingosegundo
Last active October 5, 2021 14:04
Show Gist options
  • Save vikingosegundo/82d1469c61b68bf395c8462437890e56 to your computer and use it in GitHub Desktop.
Save vikingosegundo/82d1469c61b68bf395c8462437890e56 to your computer and use it in GitHub Desktop.
let b = Board(territories:territories, borders:borders)
print(board:b);
b.execute( .move( .army(of:.germany,from:berlin, to:silesia)) )
b.execute( .move( .army(of:.germany,from:ruhr, to:holland)) )
b.execute( .move(.fleet(of:.britain,from:midatlantic,
to:westernmediterrean)) )
b.execute( .move( .army(of:.germany,from:silesia, to:galicia)) )
b.execute( .move( .army(of:.germany,from:holland, to:belgium)) )
b.execute( .move(.fleet(of:.britain,from:westernmediterrean,
to:tyrrhenian)) )
b.execute( .move( .army(of:.germany,from:galicia, to:rumania )) )
b.execute( .move(.fleet(of:.britain,from:tyrrhenian,to:ioniansea)) )
b.execute( .move( .army(of:.germany,from:rumania, to:bulgaria )) )
b.execute( .move(.fleet(of:.britain,from:ioniansea, to:aegeansea)) )
b.execute( .move( .army(of:.germany,from:bulgaria, to:constantinople)) )
print(board:b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment