Add game logic and fix resources

This commit is contained in:
Andrew Cooper
2021-11-27 22:53:17 +11:00
parent 26374f143c
commit 9d7a904e68
14 changed files with 144 additions and 24 deletions

View File

@@ -8,6 +8,8 @@ namespace Tower.Models
{
private readonly Stack<int> _disks = new Stack<int>();
public bool IsEmpty => _disks.Count == 0;
public int Top => _disks.TryPeek(out var disk) ? disk : default;
public bool TryPut(int disk)