Test for added animal; minor fixes

This commit is contained in:
Zev Spitz
2022-01-22 22:27:27 +02:00
parent 9a8959154a
commit 41fdd87047
7 changed files with 88 additions and 35 deletions

View File

@@ -5,18 +5,15 @@
Console.Write(value)
End Sub
Public Overrides Sub WriteLine(value As Object)
Console.WriteLine(value)
End Sub
Public Overrides Sub WriteLine()
Console.WriteLine()
End Sub
Public Overrides Sub WriteCenteredLine(value As Object)
If Console.CursorLeft <> 0 Then Throw New InvalidOperationException("Can only write centered line if cursor is at start of line.")
Public Overrides Sub WriteCenteredLines(value As Object)
If Console.CursorLeft <> 0 Then WriteLine()
Dim toWrite = If(value?.ToString, "")
Console.WriteLine($"{Space((Console.WindowWidth - toWrite.Length) \ 2)}{toWrite}")
Write($"{Space((Console.WindowWidth - toWrite.Length) \ 2)}{toWrite}")
WriteLine()
End Sub
Public Overrides Function ReadLine() As String