public void Render() { var tetriMino = _tetriMinoRepository.GetTetriMino(_tetriMinoSupplier.Next, _tetriMinoRotation); var color = tetriMino.Color; var mino = tetriMino; foreach (var point in mino.Points) { _blockRenderer.Add(point + new Point(13, 0), color); } }
public void Render() { var tetriMino = _tetriMinoRepository.GetTetriMino(_minoType, _rotation); var color = tetriMino.Color; var mino = tetriMino; foreach (var point in mino.Points) { var pos = point + _position; _blockRenderer.Add(pos, color); } }
public void Render() { for (var i = 0; i < Height + 1; ++i) { _blockRenderer.Add(new Point(-1, i), Color.gray); _blockRenderer.Add(new Point(Width, i), Color.gray); } for (var i = 0; i < Width; ++i) { _blockRenderer.Add(new Point(i, Height), Color.gray); } for (var i = 0; i < Height; i++) { for (var j = 0; j < Width; j++) { if (_blocks[j, i].HasValue) { _blockRenderer.Add(new Point(j, i), _blocks[j, i].Value); } } } }