summaryrefslogtreecommitdiff
path: root/Pieces/Pawn.cs
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2020-09-02 11:08:17 +0200
committerAldrik Ramaekers <aldrikboy@gmail.com>2020-09-02 11:08:17 +0200
commit4811afb52c511565d2b13f36ed645243c7557803 (patch)
tree3533dc4a8dfb5ed610033e0b9c527a535be6143b /Pieces/Pawn.cs
board generation
Diffstat (limited to 'Pieces/Pawn.cs')
-rw-r--r--Pieces/Pawn.cs34
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();
+ }
+ }
+}