Add numbers
This commit is contained in:
@@ -18,6 +18,7 @@ namespace CoopSweeper.GameTypes
|
|||||||
public FieldState State { get; set; }
|
public FieldState State { get; set; }
|
||||||
|
|
||||||
public int SurroundingBombs { get; set; }
|
public int SurroundingBombs { get; set; }
|
||||||
|
|
||||||
public int CheckID { get; set; }
|
public int CheckID { get; set; }
|
||||||
|
|
||||||
public DisplayState GetDisplayState()
|
public DisplayState GetDisplayState()
|
||||||
@@ -31,7 +32,7 @@ namespace CoopSweeper.GameTypes
|
|||||||
case FieldState.REVEALED:
|
case FieldState.REVEALED:
|
||||||
if(ContainsBomb)
|
if(ContainsBomb)
|
||||||
return DisplayState.BOMB;
|
return DisplayState.BOMB;
|
||||||
return 0;
|
return (DisplayState)SurroundingBombs;
|
||||||
}
|
}
|
||||||
return DisplayState.ERROR;
|
return DisplayState.ERROR;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace CoopSweeper
|
|||||||
case ConsoleKey.Spacebar:
|
case ConsoleKey.Spacebar:
|
||||||
game.Reveal(cursorPosX, cursorPosY); break;
|
game.Reveal(cursorPosX, cursorPosY); break;
|
||||||
case ConsoleKey.F:
|
case ConsoleKey.F:
|
||||||
game.SetFlag(cursorPosX, cursorPosY); break;
|
game.ToggleMark(cursorPosX, cursorPosY); break;
|
||||||
}
|
}
|
||||||
if (cursorPosX < 0) cursorPosX = 0;
|
if (cursorPosX < 0) cursorPosX = 0;
|
||||||
if (cursorPosY < 0) cursorPosY = 0;
|
if (cursorPosY < 0) cursorPosY = 0;
|
||||||
@@ -87,7 +87,7 @@ namespace CoopSweeper
|
|||||||
case DisplayState.NUMBER8:
|
case DisplayState.NUMBER8:
|
||||||
fgChanged = true;
|
fgChanged = true;
|
||||||
Console.ForegroundColor = ConsoleColor.Yellow;
|
Console.ForegroundColor = ConsoleColor.Yellow;
|
||||||
c = state.ToString()[0];
|
c = ((int)state).ToString()[0];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (isCursor)
|
if (isCursor)
|
||||||
|
|||||||
Reference in New Issue
Block a user