public void draw(PaintEventArgs e, Drawinator d, bool gameOver) { foreach (Cell c in field) { c.draw(e, d, gameOver); } }
public void Draw(PaintEventArgs e, Drawinator drawinator) { digit1 = getGraphic((seconds / 100) % 10); digit2 = getGraphic((seconds / 10) % 10); digit3 = getGraphic((seconds) % 10); drawinator.Draw(Panels.MINES, e, digit1, 0, 0); drawinator.Draw(Panels.MINES, e, digit2, 1, 0); drawinator.Draw(Panels.MINES, e, digit3, 2, 0); }
public void Draw(PaintEventArgs e, Drawinator drawinator) { drawinator.Draw(Panels.MINES, e, digit1, 0, 0); drawinator.Draw(Panels.MINES, e, digit2, 1, 0); drawinator.Draw(Panels.MINES, e, digit3, 2, 0); }
public void draw(PaintEventArgs e, Drawinator d, bool gameOver) { if (!gameOver) { if (Flagged) { d.Draw(Panels.MINEFIELD, e, GraphicsLibrary.FLAGGED, X, Y); } else if (CellState == CellState.UP) { d.Draw(Panels.MINEFIELD, e, GraphicsLibrary.UP, X, Y); } else if (HasBomb && gameOver) { d.Draw(Panels.MINEFIELD, e, GraphicsLibrary.BOMB, X, Y); } else if (TouchesCount == 0 || TempDown) { d.Draw(Panels.MINEFIELD, e, GraphicsLibrary.CLEAR, X, Y); } else if (TouchesCount > 0) { GraphicsLibrary touches; Enum.TryParse("NUM" + TouchesCount.ToString(), out touches); d.Draw(Panels.MINEFIELD, e, touches, X, Y); } } else { if (Flagged && HasBomb) { d.Draw(Panels.MINEFIELD, e, GraphicsLibrary.FLAGGED, X, Y); } else if (Flagged && !HasBomb) { d.Draw(Panels.MINEFIELD, e, GraphicsLibrary.BOM_WRONG, X, Y); } else if (tripped) { d.Draw(Panels.MINEFIELD, e, GraphicsLibrary.BOMB_RED, X, Y); } else if (HasBomb) { d.Draw(Panels.MINEFIELD, e, GraphicsLibrary.BOMB, X, Y); } else if (CellState == CellState.UP) { d.Draw(Panels.MINEFIELD, e, GraphicsLibrary.UP, X, Y); } else if (TouchesCount > 0) { GraphicsLibrary touches; Enum.TryParse("NUM" + TouchesCount.ToString(), out touches); d.Draw(Panels.MINEFIELD, e, touches, X, Y); } else { d.Draw(Panels.MINEFIELD, e, GraphicsLibrary.CLEAR, X, Y); } } }
public void draw(PaintEventArgs e, Drawinator drawinator) { drawinator.Draw(Panels.FACE, e, state, 0, 0); }