C# 클래스 Minesweeper.Algorithms.MinefieldExtensions

Extends IMinefield and IMineArea to add some basic helper functions for enumerating objects.
파일 보기 프로젝트 열기: jaegerpicker/CantonSoftwareMentorship

공개 메소드들

메소드 설명
AreasByColumn ( this minefield ) : IEnumerable

List all of the areas in a minefield by column.

AreasByRow ( this minefield ) : IEnumerable

List all of the areas in a minefield by row.

ClearAreas ( this minefield ) : IEnumerable

Lists all of the areas in a minefield that do not contain mines, sorted in row order, from left to right, top to bottom.

MineAreas ( this minefield ) : IEnumerable

Lists all of the areas in a minefield that contain mines, sorted in row order, from left to right, top to bottom.

NeighboringAreas ( this mineArea, IMinefield minefield ) : IEnumerable

Lists all of the areas that are adjacent to a mine area in a minefield.

메소드 상세

AreasByColumn() 공개 정적인 메소드

List all of the areas in a minefield by column.
public static AreasByColumn ( this minefield ) : IEnumerable
minefield this The minefield to enumerate.
리턴 IEnumerable

AreasByRow() 공개 정적인 메소드

List all of the areas in a minefield by row.
public static AreasByRow ( this minefield ) : IEnumerable
minefield this The minefield to enumerate.
리턴 IEnumerable

ClearAreas() 공개 정적인 메소드

Lists all of the areas in a minefield that do not contain mines, sorted in row order, from left to right, top to bottom.
public static ClearAreas ( this minefield ) : IEnumerable
minefield this The minefield to enumerate.
리턴 IEnumerable

MineAreas() 공개 정적인 메소드

Lists all of the areas in a minefield that contain mines, sorted in row order, from left to right, top to bottom.
public static MineAreas ( this minefield ) : IEnumerable
minefield this The minefield to enumerate.
리턴 IEnumerable

NeighboringAreas() 공개 정적인 메소드

Lists all of the areas that are adjacent to a mine area in a minefield.
public static NeighboringAreas ( this mineArea, IMinefield minefield ) : IEnumerable
mineArea this Returns the neighbors of this area.
minefield IMinefield Uses this minefield to get references to neighboring areas.
리턴 IEnumerable