using System; using System.Collections.Generic; using System.Text; namespace CoopSweeper.GameTypes { class Field : IField { public Field() { State = FieldState.NONE; } public bool ContainsBomb { get; set; } public FieldState State { get; set; } public int SurroundingBombs { get; set; } public char ToChar() { switch(State) { case FieldState.FLAG: return 'F'; case FieldState.NONE: return '◌'; case FieldState.QUESTIONMARK: return '?'; case FieldState.REVEALED: if(ContainsBomb) return '☼'; return ' '; } return 'E'; } } }