Permalink
Browse files

for some reason hand didn't make it into git. add it now.

  • Loading branch information...
1 parent 161d4d9 commit 5fe92a037f3a793c77381e467ee3950df3dc806a @thedeeno thedeeno committed Oct 22, 2011
Showing with 37 additions and 0 deletions.
  1. +37 −0 Src/Dominion/Classes/Hand.cs
@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework;
+
+namespace Dominion.Classes
+{
+ public class Hand : List<Card>
+ {
+ public new void Add(Card card)
+ {
+ var box = new Rectangle();
+ box.X = ((this.Count * 140) + 20);
+ box.Y = 600;
+ box.Width = card.Image.Width;
+ box.Height = card.Image.Height;
+ card.position = box;
+ card.Visible = true;
+
+ base.Add(card);
+ }
+ public new void Remove(Card card)
+ {
+ var box = new Rectangle();
+ box.X = 0;
+ box.Y = 0;
+ box.Width = card.Image.Width;
+ box.Height = card.Image.Height;
+ card.position = box;
+ card.Visible = false;
+
+ base.Remove(card);
+ }
+ }
+}

0 comments on commit 5fe92a0

Please sign in to comment.