Skip to content

Instantly share code, notes, and snippets.

@daleth90
Created April 29, 2018 07:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daleth90/6bd1208461393d0916b7ed6402095b04 to your computer and use it in GitHub Desktop.
Save daleth90/6bd1208461393d0916b7ed6402095b04 to your computer and use it in GitHub Desktop.
using Zenject;
public class OthelloGame : IInitializable {
private readonly OthelloBoardModel othelloBoard;
public OthelloGame( OthelloBoardModel othelloBoard ) {
this.othelloBoard = othelloBoard;
}
public void Initialize() {
StartNewGame();
}
public void StartNewGame() {
othelloBoard.SetSide( Disk.DARK );
othelloBoard.TryPlaceDisk( 4, 5 );
othelloBoard.TryPlaceDisk( 5, 4 );
othelloBoard.SetSide( Disk.LIGHT );
othelloBoard.TryPlaceDisk( 4, 4 );
othelloBoard.TryPlaceDisk( 5, 5 );
othelloBoard.SetSide( Disk.DARK );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment