forked from LibraStack/Match3-SDK
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
RUBIUS\chebanovdd
committed
Apr 20, 2022
1 parent
ee857d8
commit e9f5063
Showing
44 changed files
with
404 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,6 @@ | |
{ | ||
public interface IStatefulSlot | ||
{ | ||
void NextState(); | ||
bool NextState(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
samples/Terminal.Match3/SpecialItemDetectors/LockedItemDetector.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System.Collections.Generic; | ||
using Match3.App.Interfaces; | ||
using Terminal.Match3.Enums; | ||
using Terminal.Match3.Interfaces; | ||
|
||
namespace Terminal.Match3.SpecialItemDetectors | ||
{ | ||
public class LockedItemDetector : ISpecialItemDetector<ITerminalGridSlot> | ||
{ | ||
private readonly ITerminalGameBoardRenderer _gameBoardRenderer; | ||
|
||
public LockedItemDetector(ITerminalGameBoardRenderer gameBoardRenderer) | ||
{ | ||
_gameBoardRenderer = gameBoardRenderer; | ||
} | ||
|
||
public IEnumerable<ITerminalGridSlot> GetSpecialItemGridSlots(IGameBoard<ITerminalGridSlot> gameBoard, | ||
ITerminalGridSlot gridSlot) | ||
{ | ||
if (_gameBoardRenderer.GetTileGroup(gridSlot.GridPosition) != TileGroup.Locked) | ||
{ | ||
yield break; | ||
} | ||
|
||
var hasNextState = _gameBoardRenderer.TrySetNextTileState(gridSlot.GridPosition); | ||
if (hasNextState) | ||
{ | ||
yield break; | ||
} | ||
|
||
yield return gridSlot; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
samples/Terminal.Match3/TileGroupDetectors/LockedTileDetector.cs
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
samples/Terminal.Match3/TileGroupDetectors/TileGroupDetector.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.