Skip to content

Commit

Permalink
hopefully the repo is fixed now :)
Browse files Browse the repository at this point in the history
  • Loading branch information
SoundGoddess committed May 30, 2016
1 parent bdd477f commit 3894bd7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
20 changes: 15 additions & 5 deletions Source/OpenSolitaire.Classic/OpenSolitaireClassic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ namespace OpenSolitaire.Classic {
/// This is the main type for your game.
/// </summary>
public class OpenSolitaireClassic : Game {

private const string version = "v 0.9.1";


SpriteBatch spriteBatch;

BoxingViewportAdapter viewport;
Expand Down Expand Up @@ -50,7 +54,7 @@ public OpenSolitaireClassic() {
graphics.PreferredBackBufferWidth = WINDOW_WIDTH;
graphics.PreferredBackBufferHeight = WINDOW_HEIGHT;

this.Window.Title = "???Open Solitaire Classic - hosed repo :(:(:(";
this.Window.Title = "Open Solitaire Classic";
this.Window.AllowUserResizing = true;

IsMouseVisible = true;
Expand Down Expand Up @@ -189,10 +193,10 @@ protected override void Draw(GameTime gameTime) {

spriteBatch.Begin(transformMatrix: viewport.GetScaleMatrix(), samplerState: SamplerState.LinearWrap);

var logoRect = new Rectangle(10, 620, metaSmug.Width, metaSmug.Height);
var logoVect = new Vector2(10, WINDOW_HEIGHT - metaSmug.Height - 10);

// todo: please comment out the line below if you're going to distribute the game
spriteBatch.Draw(metaSmug, logoRect, Color.White);
spriteBatch.Draw(metaSmug, logoVect, Color.White);

spriteBatch.Draw(newGame, newGameRect, newGameColor);

Expand All @@ -212,11 +216,17 @@ protected override void Draw(GameTime gameTime) {
spriteBatch.Draw(debug, debugRect, debugColor);
#endif

spriteBatch.DrawString(debugFont, "repo hosed", new Vector2(666,640), Color.Black);
spriteBatch.DrawString(debugFont, "v 0.9", new Vector2(998,640), Color.Black);
var versionSize = debugFont.MeasureString(version);
var versionPos = new Vector2(WINDOW_WIDTH - versionSize.X - 10, WINDOW_HEIGHT - versionSize.Y - 10);
spriteBatch.DrawString(debugFont, version, versionPos, Color.Black);

table.Draw(gameTime);

if (table.drawPile.Count == 0) spriteBatch.Draw(refreshMe, new Vector2(35,50), debugColor);

var items = dragonDrop.dragItems.OrderBy(z => z.ZIndex).ToList();

foreach (var item in items) if (item.ZIndex > 1000) item.Draw(gameTime);

spriteBatch.End();

Expand Down
2 changes: 1 addition & 1 deletion Source/OpenSolitaire.Classic/TableClassic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ private void OnCollusion(object sender, Card.CollusionEvent e) {

Console.WriteLine(card.suit.ToString() + card.rank + " -> " + destination.suit + destination.rank);

if (destination.stack.type == StackType.play && card.color == destination.color) card.SetParent(destination);
if (destination.stack.type == StackType.play && card.suit == destination.suit) card.SetParent(destination);
else if (destination.stack.type == StackType.stack && card.color != destination.color &&
card.rank == destination.rank - 1) card.SetParent(destination);

Expand Down

0 comments on commit 3894bd7

Please sign in to comment.