static void Main(string[] args) { byte field = 15; byte win = 5; IPlayable p1; Console.WriteLine("Would you like to play 1 - yes:"); int c; Int32.TryParse(Console.ReadLine(), out c); if (c == 1) { p1 = new HPlayer(field, win, (byte)1); } else { p1 = new MiniMaxPlayer(0); } IPlayable p2 = new MiniMaxPlayer(6); Game game = new Game(field, win, p1, p2); game.StartGame(); Console.ReadKey(); }
public void Login(HPlayer player) { allPlayer.Add(player); player.RpcSetPlayer(allPlayer.Count); if (allPlayer.Count == 2) // { process = Process.decidePlayer; // } }
public override dynamic ToDynamic() { var baseDynamic = base.ToDynamic(); baseDynamic.start = StartDate; baseDynamic.end = EndDate; baseDynamic.duration = Duration; baseDynamic.HplayIn = HPlayIn?.ToDynamic(); baseDynamic.HPlayer = HPlayer?.ToDynamic(); return(baseDynamic); }