public static Computer getInstance(IMove lvl) { if (instance == null) { instance = new Computer(lvl); } return instance; }
public PutShipsUserControl(IMove lvl) { InitializeComponent(); computer = Computer.getInstance(lvl); DisableComputerBoard(); computerShipsAdded = computer.PutComputerShips(); MessageBox.AppendText("Dodano wszystkie statki przeciwnika."); MessageBox.AppendText(Environment.NewLine + "Proszę dodać dwumasztowy statek."); }