mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2026-01-06 18:14:27 -08:00
Add game logic and fix resources
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user