public override string VisitShot(ShotCommand command) { string shotType = GetShotType(command.Info.Data); string json = " \"command\": {\n"; json += " \"player\": \"" + command.GetPlayerName() + "\",\n"; json += " \"type\": \"shoot mine\",\n"; json += " \"shot\": \"" + shotType + "\",\n"; json += " \"x\": " + command.Point.X + ",\n"; json += " \"y\": " + command.Point.Y + ",\n"; json += " },\n"; return(json); }
public override string VisitShot(ShotCommand command) { string shotType = GetShotType(command.Info.Data); string xml = "<command>\n"; xml += " <player>" + command.GetPlayerName() + "</player>\n"; xml += " <type>Shoot mine</type>\n"; xml += " <shot>" + shotType + "</shot>\n"; xml += " <x>" + command.Point.X + "</x>\n"; xml += " <y>" + command.Point.Y + "</y>\n"; xml += "</command>\n"; return(xml); }
public abstract string VisitShot(ShotCommand command);
public override string VisitShot(ShotCommand command) { string shotType = GetShotType(command.Info.Data) + " shot"; return("Player " + command.GetPlayerName() + " shot " + shotType + " at " + command.Point + ".\n"); }