From c1c462725fe1fb32f5cdf9a0ff14113f0eb7e76b Mon Sep 17 00:00:00 2001 From: wcko87 Date: Mon, 8 May 2017 18:31:05 +0800 Subject: [PATCH] How to be even more lazy: define a function Tile(x, y) so that you can write mapTile: Tile(133, 12) instead of mapTile: new MapTileCoordinate(133, 12)! --- rabi_splitter_WPF/BossFightConfig.cs | 8 ++++---- rabi_splitter_WPF/BossFightEnum.cs | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/rabi_splitter_WPF/BossFightConfig.cs b/rabi_splitter_WPF/BossFightConfig.cs index 46af57a..a2c8645 100644 --- a/rabi_splitter_WPF/BossFightConfig.cs +++ b/rabi_splitter_WPF/BossFightConfig.cs @@ -50,7 +50,7 @@ namespace rabi_splitter_WPF new BossFight ( displayName: "Rita", music: Music.MIDSTREAM_JAM, - mapTile: new MapTileCoordinate(86, 10), + mapTile: Tile(86, 10), startingBosses: new[] { Boss.Rita } ); @@ -58,7 +58,7 @@ namespace rabi_splitter_WPF new BossFight ( displayName: "Cicini", music: Music.HI_TECH_DUEL, - mapTile: new MapTileCoordinate(22, 14), + mapTile: Tile(22, 14), startingBosses: new[] { Boss.Cicini } ); @@ -66,7 +66,7 @@ namespace rabi_splitter_WPF new BossFight ( displayName: "Cocoa2", music: Music.GET_ON_WITH_IT, - mapTile: new MapTileCoordinate(14, 10), + mapTile: Tile(14, 10), startingBosses: new[] { Boss.Cocoa2 } ); @@ -179,7 +179,7 @@ namespace rabi_splitter_WPF displayName: "Side Chapter", music: Music.GET_ON_WITH_IT, map: Map.RabiRabiTown, - mapTile: new MapTileCoordinate(133, 12), + mapTile: Tile(133, 12), extraCondition: (startingBosses, music, map, mapTile) => { return startingBosses.Count == 3; } diff --git a/rabi_splitter_WPF/BossFightEnum.cs b/rabi_splitter_WPF/BossFightEnum.cs index 0624d41..3cecaa4 100644 --- a/rabi_splitter_WPF/BossFightEnum.cs +++ b/rabi_splitter_WPF/BossFightEnum.cs @@ -79,6 +79,11 @@ namespace rabi_splitter_WPF } } + private static MapTileCoordinate Tile(int x, int y) + { + return new MapTileCoordinate(x, y); + } + public override bool Equals(object obj) { var otherValue = obj as BossFight;