Example #1
0
 public HypersonicServer()
 {
     if (Directions.Count() == 0)
     {
         Directions.Add(new Point(1, 0));
         Directions.Add(new Point(-1, 0));
         Directions.Add(new Point(0, 1));
         Directions.Add(new Point(0, -1));
     }
     player = new HypersonicPlayer(0);
     human  = new HypersonicHuman(1);
     States.Add(ServerGameState.Initial());
 }
Example #2
0
        //Rename this method to Main() when running on CG
        static void MainX(string[] args)
        {
            HypersonicPlayer player = new HypersonicPlayer(int.Parse(Console.ReadLine().Split(' ')[2]));

            //
            while (true)
            {
                //
                string serialization = "";
                for (int i = 0; i < 11; i++)
                {
                    serialization += Console.ReadLine() + "\n";
                }
                int entities = int.Parse(Console.ReadLine());
                serialization += entities.ToString() + "\n";
                for (int i = 0; i < entities; i++)
                {
                    serialization += Console.ReadLine() + "\n";
                }
                //
                string move = player.GetMove(serialization);
                Console.WriteLine(move);
            }
        }