diff options
Diffstat (limited to 'Pieces/Pawn.cs')
| -rw-r--r-- | Pieces/Pawn.cs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Pieces/Pawn.cs b/Pieces/Pawn.cs new file mode 100644 index 0000000..d518b8e --- /dev/null +++ b/Pieces/Pawn.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Chess.Pieces +{ + class Pawn : ChessPiece + { + public Pawn() + { + PieceImage = new Bitmap(Chess.Properties.Resources.b_pawn_png_shadow_256px); + } + + public override void Draw(Graphics graphics, float x, float y, float tileWidth, float tileHeight) + { + if (PieceImage != null) + { + var image = this.ResizeImage(PieceImage, (int)tileWidth, (int)tileHeight); + + graphics.DrawImage(image, new PointF(x*tileWidth, y*tileHeight)); + + image.Dispose(); + } + } + + public override bool MoveTo() + { + throw new NotImplementedException(); + } + } +} |
