📄 brick.cs
字号:
using System;
using System.Drawing;
namespace AnotherBlock
{
/// <summary>
/// Represents a brick for a Tetris block or for the game board.
/// </summary>
public struct Brick
{
/// <summary>
/// Private attribute that holds if the brick is filled or not.
/// </summary>
private bool filled;
/// <summary>
/// Private attribute that holds the brick image.
/// </summary>
private Image brickImage;
/// <summary>
/// Property that holds and sets if the brick is filled or not.
/// </summary>
public bool Filled
{
get
{
// Returns the value in the filled attribute.
return filled;
}
set
{
// Sets the filled attribute to the value.
filled = value;
}
}
/// <summary>
/// Property that holds and sets the brick image.
/// </summary>
public Image BrickImage
{
get
{
// Returns the brickImage attribute.
return brickImage;
}
set
{
// Sets the brickImage attribute to the value.
brickImage = value;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -