private int MapBombCount(Icons.Icon bombCountIcon) { if (bombCountIcon == Icons.Icon.Count0) { return(0); } else if (bombCountIcon == Icons.Icon.Count1) { return(1); } else if (bombCountIcon == Icons.Icon.Count2) { return(2); } else if (bombCountIcon == Icons.Icon.Count3) { return(3); } else if (bombCountIcon == Icons.Icon.Count4) { return(4); } else if (bombCountIcon == Icons.Icon.Count5) { return(5); } else if (bombCountIcon == Icons.Icon.Count6) { return(6); } else if (bombCountIcon == Icons.Icon.Count7) { return(7); } else if (bombCountIcon == Icons.Icon.Count8) { return(8); } else if (bombCountIcon == Icons.Icon.Count9) { return(9); } else { throw new ArgumentException(); } }
private Face MapFace(Icons.Icon faceIcon) { if (faceIcon == Icons.Icon.NormalFace) { return(Face.Normal); } else if (faceIcon == Icons.Icon.WinFace) { return(Face.Win); } else if (faceIcon == Icons.Icon.LoseFace) { return(Face.Lose); } else { throw new ArgumentException(); } }
private Grid MapGrid(Icons.Icon icon) { if (icon == Icons.Icon.RawGrid) { return(Grid.Raw); } else if (icon == Icons.Icon.EmptyGrid) { return(Grid.Empty); } else if (icon == Icons.Icon.Number1Grid) { return(Grid.Number1); } else if (icon == Icons.Icon.Number2Grid) { return(Grid.Number2); } else if (icon == Icons.Icon.Number3Grid) { return(Grid.Number3); } else if (icon == Icons.Icon.Number4Grid) { return(Grid.Number4); } else if (icon == Icons.Icon.Number5Grid) { return(Grid.Number5); } else if (icon == Icons.Icon.Number6Grid) { return(Grid.Number6); } else if (icon == Icons.Icon.Number7Grid) { return(Grid.Number7); } else if (icon == Icons.Icon.Number8Grid) { return(Grid.Number8); } else if (icon == Icons.Icon.FlagGrid) { return(Grid.Flag); } else if (icon == Icons.Icon.FlagGrid) { return(Grid.Flag); } else if (icon == Icons.Icon.QuestionGrid) { return(Grid.Question); } else if (icon == Icons.Icon.BombGrid) { return(Grid.Bomb); } else if (icon == Icons.Icon.RedBombGrid) { return(Grid.Bomb); } else { throw new ArgumentException(); } }