This commit is contained in:
Geir Okkenhaug Jerstad 2024-12-04 11:07:21 +01:00
parent 4aa314fa2b
commit 9adcac365a
49 changed files with 1434 additions and 1 deletions

View file

@ -0,0 +1,16 @@
namespace TowersOfHanoiTerje;
internal class Disc
{
private readonly int _size;
public Disc(int size)
{
_size = size;
}
public void Show()
{
var col = 1 + (columnNo - 1) * 15;
}
}

View file

@ -0,0 +1,6 @@
namespace TowersOfHanoiTerje;
public class Game
{
}

View file

@ -0,0 +1,19 @@
startuml
skin rose
actor User
User -> Game: MoveDisc(1,2)
Game -> Game: GetTower(1)
Game -> Tower: GetTopDisc()
Game -> Disc: GetSize()
Game -> Game: GetTower(2)
Game -> Tower: GetTopDisc()
Game -> Disc: GetSize()
Game -> Game: IsValidMove()
Game -> Tower: var disc = RemoveTopDisc()
Game -> Tower: AddDisc(disc)
@enduml

View file

@ -1 +1,8 @@

using TowersOfHanoiTerje;
Console.Clear();
var game = new TowersOfHanoiTerje.Game();
game.Run();
Console.CursorTop=10;

View file

@ -0,0 +1,6 @@
namespace TowersOfHanoiTerje;
public class Tower
{
}