コード例 #1
0
        public override string VisitMine(MineCommand command)
        {
            string json = "  \"command\": {\n";

            json += "    \"player\": \"" + command.GetPlayerName() + "\",\n";
            json += "    \"type\": \"set mine\",\n";
            json += "    \"x\": " + command.Point.X + ",\n";
            json += "    \"y\": " + command.Point.Y + ",\n";
            json += "  },\n";
            return(json);
        }
コード例 #2
0
        public override string VisitMine(MineCommand command)
        {
            string xml = "<command>\n";

            xml += "  <player>" + command.GetPlayerName() + "</player>\n";
            xml += "  <type>Set mine</type>\n";
            xml += "  <x>" + command.Point.X + "</x>\n";
            xml += "  <y>" + command.Point.Y + "</y>\n";
            xml += "</command>\n";
            return(xml);
        }
コード例 #3
0
 public abstract string VisitMine(MineCommand command);
コード例 #4
0
 public override string VisitMine(MineCommand command)
 {
     return("Player " + command.GetPlayerName() + " set a mine at " + command.Point + ".\n");
 }