Commit 5dfd4299 authored by Andres Käver's avatar Andres Käver
Browse files

slides

parent 7c4d0c94
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using GameBrain;
using GameConsoleUI;
......@@ -77,4 +79,33 @@ namespace ConsoleApp
return (x, y);
}
}
public class Person
{
[AllowNull]
public string ScreenName
{
get => _screenName;
set => _screenName = value ?? GenerateRandomScreenName();
}
private string _screenName = GenerateRandomScreenName();
[DisallowNull]
public string? ReviewComment
{
get => _comment;
set => _comment = value ?? throw new ArgumentNullException(nameof(value), "Cannot set to null");
}
string? _comment;
[return: MaybeNull]
public T Find<T>(IEnumerable<T> sequence, Func<T, bool> predicate)
{
}
public void EnsureCapacity<T>([NotNull] ref T[]? storage, int size)
{
}
}
}
\ No newline at end of file
......@@ -2,5 +2,6 @@
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<WarningsAsErrors>CS8600;CS8602;CS8603;CS8613;CS8618;CS8625</WarningsAsErrors>
</PropertyGroup>
</Project>
......@@ -16,7 +16,6 @@ Do not allow user to specify user choices that are already taken (including the
And think out more fancy functionalities to implement:
min & max lengths, keyboard based navigation, colors, no duplicate items, default user choice, etc.
## HW02
***Deadline: 2020-10-14 23:59:59***
......@@ -25,7 +24,6 @@ Implement basic battleship game boards, allow 2 players to place bombs on them (
Its not mandatory to save ship settings, or even figure out how to keep track of ships. So just board and bombs.
=============================
Battleship initial description
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment