Skip to content

Instantly share code, notes, and snippets.

@daleth90
Created Apr 29, 2018
Embed
What would you like to do?
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