<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2889659702655543132</id><updated>2024-09-19T15:52:19.865-07:00</updated><category term="XNA"/><category term="C#"/><category term="CSSLP"/><category term="Game Programming"/><category term="Solitaire"/><category term="Anouncement"/><category term="Games"/><category term="Programming"/><category term="Security"/><title type='text'>Coding Vortex</title><subtitle type='html'>Blog for coding standards and practices as well as tips for C#, Java, Javascript, VB, PHP, etc... development</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://advancedmaster.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2889659702655543132/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://advancedmaster.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16519632441896564631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2889659702655543132.post-6541680597962881561</id><published>2012-04-04T13:44:00.002-07:00</published><updated>2012-12-11T04:25:23.721-08:00</updated><title type='text'>SQL 70-461 - Query SQL Server 2012 Study guide</title><content type='html'>I am currently preparing for the upcoming SQL 2012 exam 70-461. Since no book currently is&amp;nbsp;available&amp;nbsp;my best resource and always is the best resource is the MSDN. So here is what I have as far as the outline and it&#39;s corresponding entries in the MSDN and other sources. I will continue to update over the next few days.&lt;br /&gt;
&lt;h3&gt;
Create Database Objects (24%)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
  Create and alter tables using T-SQL syntax (simple statements).
  &lt;ul&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms190273(v=sql.110).aspx&quot;&gt;ALTER&lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms173790(v=sql.110).aspx&quot;&gt;DROP&lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms190273(v=sql.110).aspx&quot;&gt;ALTER COLUMN&lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms174979(v=sql.110).aspx&quot;&gt;CREATE&lt;/a&gt; 
   &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
  Create and alter views (simple statements).
  &lt;ul&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms191432(v=sql.110).aspx&quot;&gt;Create Indexed Views&lt;/a&gt; 
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms187956(v=sql.110).aspx&quot;&gt;CREATE&lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms173846(v=sql.110).aspx&quot;&gt;ALTER&lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms173492(v=sql.110).aspx&quot;&gt;DROP&lt;/a&gt;
   &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
  Design views.
  &lt;ul&gt;
&lt;li&gt;
    &lt;a href=&quot;http://www.craigsmullins.com/cnr_0299b.htm&quot;&gt;View Summary&lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    ensure code non regression by keeping consistent signature for procedure, 
    views, and function (interfaces)
   &lt;/li&gt;
&lt;li&gt;
    security implications
   &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
  Create and modify constraints (simple statements).
  &lt;ul&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms188066(v=sql.110).aspx&quot;&gt;Create constraints on tables&lt;/a&gt; 
   &lt;/li&gt;
&lt;li&gt;
    define constraints 
   &lt;/li&gt;
&lt;li&gt;
    unique constraints 
   &lt;/li&gt;
&lt;li&gt; 
    default constraints 
   &lt;/li&gt;
&lt;li&gt;
    primary and foreign key constraints
   &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
  Create and alter DML triggers.
  &lt;ul&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms189799(v=sql.110).aspx&quot;&gt;Create Trigger&lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms176072(v=sql.110).aspx&quot;&gt;Alter Trigger&lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    inserted and deleted tables 
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms190739(v=sql.110).aspx&quot;&gt;Nested Triggers&lt;/a&gt; 
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms178110(v=sql.110).aspx&quot;&gt;Types of Triggers&lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    Update Functions
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms190752(v=sql.110).aspx&quot;&gt;Handle multiple rows in a session&lt;/a&gt;    
   &lt;/li&gt;
&lt;li&gt;
    performance implications of triggers
   &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Work with Data (27%)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
  Query data by using SELECT statements.
  &lt;ul&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms189798(v=sql.110).aspx&quot;&gt;Ranking Function&lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    write and perform queries efficiently using the new code items such as synonyms and joins (except, intersect) 
   &lt;/li&gt;
&lt;li&gt;
    implement logic which uses dynamic SQL and system metadata 
   &lt;/li&gt;
&lt;li&gt;
    write efficient, technically complex SQL queries, including all types of joins versus the use of derived tables 
   &lt;/li&gt;
&lt;li&gt;
    determine what code may or may not execute based on the tables provided 
   &lt;/li&gt;
&lt;li&gt;
    given a table with constraints, determine which statement set would load a table use and understand different 
   &lt;/li&gt;
&lt;li&gt;
    data access technologies 
   &lt;/li&gt;
&lt;li&gt;
    CASE versus ISNULL versus COALESCE
   &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
  Implement sub-queries.
  &lt;ul&gt;
&lt;li&gt;
    identify problematic elements in query plans 
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-US/library/ms177410(v=sql.110).aspx&quot;&gt;Pivot and Unpivot&amp;lt;/&amp;gt; 
   &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms175156(v=SQL.110).aspx&quot;&gt;Apply Operator&lt;/a&gt; 
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms190766(v=SQL.110).aspx&quot;&gt;CTE Statement&lt;/a&gt; 
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms175972(v=sql.110).aspx&quot;&gt;With Statement&lt;/a&gt;
   &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
  Implement data types.
  &lt;ul&gt;
&lt;li&gt;
    use appropriate data 
   &lt;/li&gt;
&lt;li&gt;
    understand the uses and limitations of each data type 
   &lt;/li&gt;
&lt;li&gt;
    Impact of GUID (newid, newsequentialid) on database performance, when to use which data type for columns&lt;br /&gt;
    &lt;a href=&quot;http://blog.sqlauthority.com/2010/04/28/sql-server-guid-vs-int-your-opinion/&quot;&gt;Article 1&lt;/a&gt;&lt;br /&gt;
    &lt;a href=&quot;http://blogs.msdn.com/b/sqlserverfaq/archive/2010/05/27/guid-vs-int-debate.aspx&quot;&gt;Article 2&lt;/a&gt;&lt;br /&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms190215(v=sql.110).aspx&quot;&gt;Unique Identifier&lt;/a&gt;&lt;br /&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms190215(v=sql.110).aspx&quot;&gt;NEWID&lt;/a&gt;&lt;br /&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms189786(v=sql.110).aspx&quot;&gt;NEWSEQUENTIALID&lt;/a&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=2889659702655543132&quot;&gt;&lt;br /&gt;
   &lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
  Implement aggregate queries.
  &lt;ul&gt;
&lt;li&gt;
    Analytic functions 
     &lt;ul&gt;
&lt;li&gt;
       &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/hh231078(v=sql.110).aspx&quot;&gt;CUME_DIST&lt;/a&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=2889659702655543132&quot;&gt;&lt;br /&gt;
      &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
       &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/hh213018(v=sql.110).aspx&quot;&gt;FIRST_VALUE&lt;/a&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=2889659702655543132&quot;&gt;&lt;br /&gt;
      &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
       &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/hh231256(v=sql.110).aspx&quot;&gt;LAG&lt;/a&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=2889659702655543132&quot;&gt;&lt;br /&gt;
      &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
       &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/hh231517(v=sql.110).aspx&quot;&gt;LAST_VALUE&lt;/a&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=2889659702655543132&quot;&gt;&lt;br /&gt;
      &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
       &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/hh213125(v=sql.110).aspx&quot;&gt;LEAD&lt;/a&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=2889659702655543132&quot;&gt;&lt;br /&gt;
      &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
       &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/hh231473(v=sql.110).aspx&quot;&gt;PERCENTILE_CONT&lt;/a&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=2889659702655543132&quot;&gt;&lt;br /&gt;
      &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
       &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/hh231327(v=sql.110).aspx&quot;&gt;PERCENTILE_DISC&lt;/a&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=2889659702655543132&quot;&gt;&lt;br /&gt;
      &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
       &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/hh213573(v=sql.110).aspx&quot;&gt;PERCENT_RANK&lt;/a&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=2889659702655543132&quot;&gt;&lt;br /&gt;
      &lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb510427(v=sql.110).aspx&quot;&gt;Grouping sets&lt;/a&gt; 
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/hh403400(v=sql.110).aspx&quot;&gt;Spatial Aggregates&lt;/a&gt;&lt;br /&gt;
    &lt;a href=&quot;http://blogs.msdn.com/b/edkatibah/archive/2011/04/27/spatial-aggregates-in-sql-server-denali.aspx&quot;&gt;Summary&lt;/a&gt;
     &lt;ul&gt;
&lt;li&gt;
       &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ff929312(v=sql.110).aspx&quot;&gt;Collection&lt;/a&gt;
      &lt;/li&gt;
&lt;li&gt;
       &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ff929099(v=sql.110).aspx&quot;&gt;ConvexHull&lt;/a&gt;
      &lt;/li&gt;
&lt;li&gt;
       &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ff929145(v=sql.110).aspx&quot;&gt;Envelope&lt;/a&gt;
      &lt;/li&gt;
&lt;li&gt;
       &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ff929095(v=sql.110).aspx&quot;&gt;Union&lt;/a&gt;
      &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms189798(v=sql.110).aspx&quot;&gt;Apply ranking functions&lt;/a&gt;
   &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
  Query and manage XML data.
  &lt;ul&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms189887(v=sql.110).aspx&quot;&gt;Understand XML datatypes and their schemas and interoperability with limitations and restrictions&lt;/a&gt; 
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms176009(v=sql.110).aspx&quot;&gt;Implement XML schemas and handling of XML data&lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb522446(v=sql.110).aspx&quot;&gt;How to handle XML data in SQL Server and when and when not to use it&lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms177400(v=sql.110).aspx&quot;&gt;Namespaces&lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/aa179112(v=SQL.110).aspx&quot;&gt;Import XML&lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/aa179108(v=sql.110).aspx&quot;&gt;Export XML&lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms191497(v=sql.110).aspx&quot;&gt;XML indexing&lt;/a&gt;
   &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Modify Data (24%)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
  Create and alter stored procedures (simple statements).
  &lt;ul&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms190782(v=sql.110).aspx&quot;&gt;Summary&lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms187926(v=sql.110).aspx&quot;&gt;CREATE&lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms189762(v=sql.110).aspx&quot;&gt;ALTER&lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms182717(v=sql.110).aspx&quot;&gt;Branching logic&lt;/a&gt; 
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms188655(v=sql.110).aspx&quot;&gt;Different types of stored procedure results&lt;/a&gt; 
   &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
  Modify data by using INSERT, UPDATE, and DELETE statements.
  &lt;ul&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms174335(v=sql.110).aspx&quot;&gt;INSERT&lt;/a&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=2889659702655543132&quot;&gt;
   &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms177523(v=sql.110).aspx&quot;&gt;UPDATE&lt;/a&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=2889659702655543132&quot;&gt;
   &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms189835(v=sql.110).aspx&quot;&gt;DELETE&lt;/a&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=2889659702655543132&quot;&gt;
   &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms177564(v=sql.110).aspx&quot;&gt;Use output statement&lt;/a&gt;
   &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
  Combine datasets.
  &lt;ul&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/aa196318(v=sql.110).aspx&quot;&gt;SQL Joins&lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/aa213233(v=sql.110).aspx&quot;&gt;Join Fundamentals
   &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms180026(v=sql.110).aspx&quot;&gt;Union&lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms181765(v=sql.110).aspx&quot;&gt;Case&lt;/a&gt; vs. &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms184325(v=sql.110).aspx&quot;&gt;Isnull&lt;/a&gt; vs. &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms190349(v=sql.110).aspx&quot;&gt;Coalesce&lt;/a&gt; 
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb510625(v=sql.110).aspx&quot;&gt;Merge&lt;/a&gt;
   &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
  Work with functions.
  &lt;ul&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/aa214775(v=SQL.110).aspx&quot;&gt;Understand deterministic and non-deterministic functions&lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms177499(v=SQL.110).aspx&quot;&gt;Scalar and table values&lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms174318(v=sql.110).aspx&quot;&gt;Apply built-in scalar functions&lt;/a&gt; 
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms186755(v=sql.110).aspx&quot;&gt;CREATE&lt;/a&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=2889659702655543132&quot;&gt;
   &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms186967(v=sql.110).aspx&quot;&gt;ALTER&lt;/a&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=2889659702655543132&quot;&gt;
   &lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Troubleshoot and Optimize Queries (25%)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
  Optimize queries.
  &lt;ul&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms190397(v=sql.110).aspx&quot;&gt;Understand statistics&lt;/a&gt; 
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://sqlserverpedia.com/wiki/Examining_Query_Execution_Plans&quot;&gt;Read query plans&lt;/a&gt; 
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms188754(v=sql.110).aspx&quot;&gt;DMVs&lt;/a&gt; 
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms181714(v=sql.110).aspx&quot;&gt;Hints&lt;/a&gt; 
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms184361(v=sql.110).aspx&quot;&gt;Statistics IO&lt;/a&gt; 
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://www.simple-talk.com/sql/t-sql-programming/performance-implications-of-parameterized-queries/&quot;&gt;Dynamic vs. Parameterized queries&lt;/a&gt; 
   &lt;/li&gt;
&lt;li&gt;
    describe the different join types (HASH, MERGE, LOOP) and describe the scenarios in which they would be used
    &lt;ul&gt;
&lt;li&gt;
      &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms191517(v=sql.110).aspx&quot;&gt;Fundamentals&lt;/a&gt;
     &lt;/li&gt;
&lt;li&gt;
      &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms190014(v=sql.110).aspx&quot;&gt;INNER&lt;/a&gt;
     &lt;/li&gt;
&lt;li&gt;
      &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms187518(v=sql.110).aspx&quot;&gt;OUTER&lt;/a&gt;
     &lt;/li&gt;
&lt;li&gt;
      &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms190690(v=sql.110).aspx&quot;&gt;CROSS&lt;/a&gt;
     &lt;/li&gt;
&lt;li&gt;
      &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms177490(v=sql.110).aspx&quot;&gt;SELF&lt;/a&gt;
     &lt;/li&gt;
&lt;li&gt;
      &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms173815(v=sql.110).aspx&quot;&gt;Join Hints&lt;/a&gt;
       &lt;ul&gt;
&lt;li&gt;
         &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms189313(v=sql.110).aspx&quot;&gt;HASH&lt;/a&gt;
        &lt;/li&gt;
&lt;li&gt;
         &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms141775(v=sql.110).aspx&quot;&gt;MERGE&lt;/a&gt;
        &lt;/li&gt;
&lt;li&gt;
         &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms191318(v=sql.110).aspx&quot;&gt;LOOP&lt;/a&gt;
        &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
  Manage transactions.
  &lt;ul&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms174377(v=sql.110).aspx&quot;&gt;Transactions&lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    Understand begin, commit, and rollback 
    &lt;ul&gt;
&lt;li&gt;
      &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms188929(v=sql.110).aspx&quot;&gt;BEGIN&lt;/a&gt;
     &lt;/li&gt;
&lt;li&gt;
      &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms190295(v=sql.110).aspx&quot;&gt;COMMIT&lt;/a&gt;
     &lt;/li&gt;
&lt;li&gt;
      &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms181299(v=sql.110).aspx&quot;&gt;ROLLBACK&lt;/a&gt;
     &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms187807(v=sql.110).aspx&quot;&gt;Implicit vs. explicit transactions&lt;/a&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=2889659702655543132&quot;&gt; 
   &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms173763.aspx&quot;&gt;Isolation levels scope and type of locks&lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms187967(v=sql.110).aspx&quot;&gt;Trancount&lt;/a&gt;
   &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
  Evaluate the use of row-based operations vs. set-based operations.  
  &lt;ul&gt;
&lt;li&gt;
    &lt;a href=&quot;http://ask.sqlservercentral.com/questions/2019/set-based-vs-procedural.html&quot;&gt;Use set based rather than row based logic &lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://www.sqlservercentral.com/articles/Advanced+Querying/2785/&quot;&gt;When to use cursors&lt;/a&gt; 
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://www.simple-talk.com/community/blogs/tony_davis/archive/2009/11/13/76413.aspx&quot;&gt;Impact of scalar UDFs&lt;/a&gt;
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb510625(v=sql.110).aspx&quot;&gt;Combine multiple DML operations&lt;/a&gt; - Just use merge
   &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
  Implement error handling.
  &lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms175976(v=sql.110).aspx&quot;&gt;Implement try/catch/throw&lt;/a&gt; 
   &lt;/li&gt;
&lt;li&gt;
    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms174377(v=sql.110).aspx&quot;&gt;Transaction management&lt;/a&gt;
   &lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;iframe bordercolor=&quot;#000000&quot; frameborder=&quot;0&quot; height=&quot;250&quot; hspace=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://ad.doubleclick.net/adi/N7433.148119.BLOGGEREN/B6675536.1654;sz=300x250;ord=[timestamp]?;lid=41000613802463762;pid=UBM9780735658141;usg=AFHzDLupE_cyAgXAsvjtLzWj3zMGTDIB2Q;adurl=http%253A%252F%252Fwww.cdsbooksdvds.com%252Fproduct.jhtm%253Fsku%253DUBM9780735658141;pubid=603371;price=%2437.49;title=Microsoft+SQL+Server+2012+T-SQL+Fundamentals+By+Ben-gan%2C+Itzik;merc=CDS+Books+and+DVDS;imgsrc=http%3A%2F%2Fc381965.r65.cf1.rackcdn.com%2F9780735658141.jpg;width=110;height=135&quot; vspace=&quot;0&quot; width=&quot;300&quot;&gt;&lt;/iframe&gt;&lt;iframe bordercolor=&quot;#000000&quot; frameborder=&quot;0&quot; height=&quot;250&quot; hspace=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://ad.doubleclick.net/adi/N7433.148119.BLOGGEREN/B6675536.1647;sz=300x250;ord=[timestamp]?;lid=41000613802463762;pid=UBM9780735658226;usg=AFHzDLtslFcK-cxzG0_eE5ZvKpSnH-7XQw;adurl=http%253A%252F%252Fwww.cdsbooksdvds.com%252Fproduct.jhtm%253Fsku%253DUBM9780735658226;pubid=603371;price=%2445.65;title=Programming+Microsoft+SQL+Server+2012+By+Lobel%2C+Leonard%2F+Brust%2C+Andrew;merc=CDS+Books+and+DVDS;imgsrc=http%3A%2F%2Fc382050.r50.cf1.rackcdn.com%2F9780735658226.jpg;width=110;height=135&quot; vspace=&quot;0&quot; width=&quot;300&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://advancedmaster.blogspot.com/feeds/6541680597962881561/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://advancedmaster.blogspot.com/2012/04/sql-70-461-query-sql-server-2012-study.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2889659702655543132/posts/default/6541680597962881561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2889659702655543132/posts/default/6541680597962881561'/><link rel='alternate' type='text/html' href='http://advancedmaster.blogspot.com/2012/04/sql-70-461-query-sql-server-2012-study.html' title='SQL 70-461 - Query SQL Server 2012 Study guide'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16519632441896564631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2889659702655543132.post-2286326397075705241</id><published>2011-08-04T11:38:00.000-07:00</published><updated>2011-08-04T11:44:55.989-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CSSLP"/><category scheme="http://www.blogger.com/atom/ns#" term="Security"/><title type='text'>CSSLP Study Guide Section I</title><content type='html'>This is my current Study Guide for the &lt;a href=&quot;https://www.isc2.org/csslp-certification.aspx&quot;&gt;CSSLP &lt;/a&gt;that I plan to take soon. Most link currently go to Wikipedia, and as I find better&amp;nbsp;sources&amp;nbsp;I will update.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 24px; font-weight: bold;&quot;&gt;Secure Software Concepts&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Confidentiality&quot;&gt;Confidentiality&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Data_integrity&quot;&gt;Integrity&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Availability&quot;&gt;Availability&lt;/a&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Authentication&quot;&gt;Authentication&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Authorization&quot;&gt;Authorization&lt;/a&gt;, and Auditing&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://buildsecurityin.us-cert.gov/bsi/articles/knowledge/principles.html&quot;&gt;Security Design Principles&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://buildsecurityin.us-cert.gov/bsi/articles/knowledge/principles/351-BSI.html&quot;&gt;Least Privilege&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://buildsecurityin.us-cert.gov/bsi/articles/knowledge/principles/357-BSI.html&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0000ee;&quot;&gt;&lt;u&gt;Separation&lt;/u&gt;&lt;/span&gt;&amp;nbsp;of Duties&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://buildsecurityin.us-cert.gov/bsi/articles/knowledge/principles/347-BSI.html&quot;&gt;Defense in Depth&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://buildsecurityin.us-cert.gov/bsi/articles/knowledge/principles/349-BSI.html&quot;&gt;Fail Safe&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://buildsecurityin.us-cert.gov/bsi/articles/knowledge/principles/348-BSI.html&quot;&gt;Economy of Mechanism&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://buildsecurityin.us-cert.gov/bsi/articles/knowledge/principles/346-BSI.html&quot;&gt;Complete Mediation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://buildsecurityin.us-cert.gov/bsi/articles/knowledge/principles/352-BSI.html&quot;&gt;Never assume secrets are Safe&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://buildsecurityin.us-cert.gov/bsi/articles/knowledge/principles/350-BSI.html&quot;&gt;Least Common Mechanism&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://buildsecurityin.us-cert.gov/bsi/articles/knowledge/principles/354-BSI.html&quot;&gt;Psychological Acceptability&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://buildsecurityin.us-cert.gov/bsi/articles/knowledge/principles/356-BSI.html&quot;&gt;Weakest Link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://buildsecurityin.us-cert.gov/bsi/articles/knowledge/principles/353-BSI.html&quot;&gt;Promoting Privacy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://buildsecurityin.us-cert.gov/bsi/articles/knowledge/principles/355-BSI.html&quot;&gt;Reluctance to Trust&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://csrc.nist.gov/publications/nistpubs/800-30/sp800-30.pdf&quot;&gt;Risk Management&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Regulations, Privacy, and Compliance&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Sarbanes%E2%80%93Oxley_Act&quot;&gt;Sarbanes-Oxley Act&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Basel_II&quot;&gt;Basel II&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Gramm-Leach-Bliley_Act&quot;&gt;Gramm-leach-Bliley Act&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Health_Insurance_Portability_and_Accountability_Act&quot;&gt;Health Insurance Portability and Accountability Act&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Data_Protection_Act&quot;&gt;Data Protection Act&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Computer_misuse_act&quot;&gt;Computer Misuse act&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Software Architecture&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Zachman_Framework&quot;&gt;Zachman Framework&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Control_Objectives_for_Information_and_related_Technology&quot;&gt;Control Objectives for Information and Related Technologies&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0000ee;&quot;&gt;&lt;u&gt;Committee&lt;/u&gt;&lt;/span&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Committee_of_Sponsoring_Organizations_of_the_Treadway_Commission&quot;&gt;&amp;nbsp;of Sponsoring Organizations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Sherwood_Applied_Business_Security_Architecture&quot;&gt;Sherwood Applied Business Security Architecture&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Secure Software Development Methodologies&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Socratic_questioning&quot;&gt;Socratic&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.cert.org/octave/&quot;&gt;Operationally Critical Threat, Asset, and Vulnerability Evaluation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/STRIDE_(security)&quot;&gt;Stride&lt;/a&gt; &amp;amp; &lt;a href=&quot;http://en.wikipedia.org/wiki/DREAD:_Risk_assessment_model&quot;&gt;Dread&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.isecom.org/osstmm/&quot;&gt;Open Source Security Testing Methodology Manual&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Flaw_hypothesis_methodology&quot;&gt;Flaw Hypothesis Method&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Six_Sigma&quot;&gt;Six Sigma&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Capability_Maturity_Model_Integration&quot;&gt;Capability Maturity Model Integration&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Legal&lt;ul&gt;&lt;li&gt;Copyright&lt;/li&gt;
&lt;li&gt;IP&lt;/li&gt;
&lt;li&gt;Trademark&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Standards&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/ISO/IEC_27000-series&quot;&gt;ISO 2700x&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.owasp.org/index.php/Main_Page&quot;&gt;OWASP&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Security Models&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Bell%E2%80%93LaPadula_model&quot;&gt;Bell-LaPadula&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Clark-Wilson_model&quot;&gt;Clark-Wilson&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Biba_Model&quot;&gt;Biba&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Brewer_and_Nash_model&quot;&gt;Brewer &amp;amp; Nash Model&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Trusted Computing&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Ring_(computer_security)&quot;&gt;Ring Protection&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Trust_boundary&quot;&gt;Trust Boundary&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Reference_Model&quot;&gt;Reference Model&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Trusted_Platform_Module&quot;&gt;TPM&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Trusted_computing_base&quot;&gt;TCB&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Acquisition&lt;ul&gt;&lt;li&gt;Contracts&lt;/li&gt;
&lt;li&gt;SLAs&lt;/li&gt;
&lt;li&gt;Specifications&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://advancedmaster.blogspot.com/feeds/2286326397075705241/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://advancedmaster.blogspot.com/2011/08/csslp-study-guide-section-i.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2889659702655543132/posts/default/2286326397075705241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2889659702655543132/posts/default/2286326397075705241'/><link rel='alternate' type='text/html' href='http://advancedmaster.blogspot.com/2011/08/csslp-study-guide-section-i.html' title='CSSLP Study Guide Section I'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16519632441896564631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2889659702655543132.post-8216816824069568072</id><published>2011-07-20T05:40:00.000-07:00</published><updated>2011-07-20T05:41:47.126-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Solitaire"/><category scheme="http://www.blogger.com/atom/ns#" term="XNA"/><title type='text'>XNA Tutorial Series 1: Golf (Patience) Solitaire Part III - Deck Class</title><content type='html'>&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small; line-height: 19px; white-space: normal;&quot;&gt;&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Golf_(Patience)&quot;&gt;Golf Solitaire&lt;/a&gt;&amp;nbsp;as described by&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/&quot;&gt;wikipedia&lt;/a&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;i&gt;Golf is a Patience game where players try to earn the lowest number of points (as in golf, the sport) over the course of nine deals (or &quot;holes&quot; to further use golfing teminology). It has a tableau of 35 face-up cards and a higher ratio of skill to luck than most other solitaire card games.&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;My attempts in this tutorial series will be able to keep the code reusable and hopefully build onto this series with other Card/Solitaire games.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;b&gt;&lt;u&gt;XNA Tutorial Series 1: Golf (Patience) Solitaire Part III - Deck Class&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small; line-height: 19px;&quot;&gt;For this tutorial we will focus on the class that will handle the logic for a group of cards. Start by right clicking on your classes folder and adding a new class called&amp;nbsp;&lt;b&gt;Deck.cs&lt;/b&gt;. The first thing we will need to do is setup are using&#39;s as follows:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;using System;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using System.Collections.Generic;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using System.Linq;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using Microsoft.Xna.Framework;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using Microsoft.Xna.Framework.Content;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using Microsoft.Xna.Framework.Graphics;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using Microsoft.Xna.Framework.Input;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;Next set your class to be public.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;Now we can begin by adding a Enum to our class to represent a deck type:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public enum DeckType&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; User = 1,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Source,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Waste,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Target&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;Now we can setup the individual properties that a Card will have, I will show the code first and then proceed to explain what each property is for:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;protected List&lt;card&gt; cards = new List&lt;card&gt;();&lt;/card&gt;&lt;/card&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; protected Point pos;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; protected int deckID;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; protected DeckType deckType;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Texture2D background;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public virtual Point Position&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; get&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return pos;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pos = value;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public DeckType Type&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; get&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return deckType;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;cards will be a list of the cards in the deck, pos is a point that is used for offsetting a card image so you can have one card on top of another and see the values for both. deckID is an ID for keeping track of the decks. DeckType to indicate the enum for which type of deck it is, and a texture to store the decks background.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;Next we have our constructors:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public Deck()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; deckType = DeckType.User;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public Deck(int id)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; deckID = id;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; deckType = DeckType.User;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;Since this deck class is going to be a base type it will default to being a user deck, other deck types (waste, source, etc..) will implement the desk class. Next we will need some basic methods for maintaining the list of cards that are in the deck.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;First we will need to be able to retrieve the number of cards in the deck:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt; public virtual int CardCount()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return cards.Count();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;Get the last card(top) of the deck&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public virtual Card GetLast()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return cards.Last();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;Remove the last card&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public virtual Card RemoveLast()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Card card = cards.Last();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cards.Remove(card);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return card;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;And finally get a card&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt; public virtual Card GetCard(int index)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return cards[index];&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;In the second part of the deck class we will look at Adding cards, handling input, and drawing the cards.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://advancedmaster.blogspot.com/feeds/8216816824069568072/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://advancedmaster.blogspot.com/2011/07/xna-tutorial-series-1-golf-patience_20.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2889659702655543132/posts/default/8216816824069568072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2889659702655543132/posts/default/8216816824069568072'/><link rel='alternate' type='text/html' href='http://advancedmaster.blogspot.com/2011/07/xna-tutorial-series-1-golf-patience_20.html' title='XNA Tutorial Series 1: Golf (Patience) Solitaire Part III - Deck Class'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16519632441896564631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2889659702655543132.post-1234280381077451041</id><published>2011-07-19T06:23:00.001-07:00</published><updated>2011-07-19T06:23:39.941-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CSSLP"/><category scheme="http://www.blogger.com/atom/ns#" term="XNA"/><title type='text'>XNA tutorial</title><content type='html'>I have been a little busy lately with studying for the CSSLP, but the next tutorial in the XNA Solitaire series will be coming soon.</content><link rel='replies' type='application/atom+xml' href='http://advancedmaster.blogspot.com/feeds/1234280381077451041/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://advancedmaster.blogspot.com/2011/07/xna-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2889659702655543132/posts/default/1234280381077451041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2889659702655543132/posts/default/1234280381077451041'/><link rel='alternate' type='text/html' href='http://advancedmaster.blogspot.com/2011/07/xna-tutorial.html' title='XNA tutorial'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16519632441896564631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2889659702655543132.post-8663444181073999162</id><published>2011-07-11T11:02:00.000-07:00</published><updated>2011-07-11T18:32:51.178-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Game Programming"/><category scheme="http://www.blogger.com/atom/ns#" term="XNA"/><title type='text'>XNA Tutorial Series 1: Golf (Patience) Solitaire Part II - Card Class</title><content type='html'>&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small; line-height: 19px; white-space: normal;&quot;&gt;&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Golf_(Patience)&quot;&gt;Golf Solitaire&lt;/a&gt;&amp;nbsp;as described by&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/&quot;&gt;wikipedia&lt;/a&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;i&gt;Golf is a Patience game where players try to earn the lowest number of points (as in golf, the sport) over the course of nine deals (or &quot;holes&quot; to further use golfing teminology). It has a tableau of 35 face-up cards and a higher ratio of skill to luck than most other solitaire card games.&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;My attempts in this tutorial series will be able to keep the code reusable and hopefully build onto this series with other Card/Solitaire games.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;b&gt;&lt;u&gt;XNA Tutorial Series 1: Golf (Patience) Solitaire Part II - Card Class&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;For this tutorial we will focus on the class that will handle the logic for one individual card. Start by right clicking on your classes folder and adding a new class called &lt;b&gt;Card.cs&lt;/b&gt;. The first thing we will need to do is setup are using&#39;s as follows:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using System;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using Microsoft.Xna.Framework;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using Microsoft.Xna.Framework.Content;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using Microsoft.Xna.Framework.Graphics;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using Microsoft.Xna.Framework.Input;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;Next set your class to be public.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;Now we can begin by adding some Enums to our class. The first enum will deal with the suit of the cards:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public enum CardSuit&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Clubs = 1,&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Diamonds,&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Hearts,&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Spades&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;The next enum will be for the value of the cards:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: red; font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public enum CardValue&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: red; font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: red; font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Ace = 1,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: red; font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Two,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: red; font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Three,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: red; font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Four,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: red; font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Five,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: red; font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Six,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: red; font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Seven,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: red; font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Eight,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: red; font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Nine,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: red; font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Ten,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: red; font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Jack,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: red; font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Queen,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: red; font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;King&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: red; font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: red; font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;The final enum will be for indicating what color the card is:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public enum CardColor&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Black = 1,&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Red&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;Now we can setup the individual properties that a Card will have, I will show the code first and then proceed to explain what each property is for:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public CardSuit Suit { get; set; }&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public CardValue Value { get; set; }&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public CardColor TheColor { get; set; }&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public Boolean IsTurned { get; set; } &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public Card ParentCard { get; set; }&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public Card ChildCard { get; set; }&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public int ZOrder { get; set; }&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public String CardName { get; set; }&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public Deck OwnerDeck { get; set; }&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public Rectangle OriginRect { get; set; }&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public static int CARD_WIDTH = 80;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public static int CARD_HEIGHT = 110;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Texture2D card = null;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Texture2D cardBack = null;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Rectangle rect;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public Rectangle CardRectangle&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; get&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return rect;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rect = value;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;The first three will be used to set the enums(Suit, value, and color) for the specific card. IsTurned will be used to determine if the front or the back of the card should be drawn. ParentCard and ChildCard will be used for indicating what card is above and below the card on the screen. ZOrder is similar to the css property z-index and will be used for card drag and drop. Though this game does not have drag and drop&amp;nbsp;capability&amp;nbsp;we are adding the ZOrder property for future use. CardName will be a string that will indicate which artwork to use, it will be made up of&amp;nbsp;concatenating&amp;nbsp;the cards suit with a &quot;-&quot; and the cards value. If you choose to use cards other than the ones I provide, please be sure they follow this naming convention. OwnerDeck will refer to which deck the card is currently in (draw pile, plateau, waste, etc...) this refers to a class that we will develop in part 3 of this series. Teh we have the OriginRect this is a placeholder value so that we always know where the card came from, in case we ever need to return it to that spot. Then we have two static variables for storing the size of the card. Next we have two XNA textures that will store the card image and the back of the card image. Finally we have the rectangle where those card images will be drawn.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Next up is the constructor followed by a description:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public Card(CardSuit suit, CardValue value, int z, ContentManager contentManager)&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ZOrder = z;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ParentCard = null;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ChildCard = null;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; OwnerDeck = null;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LoadCard(suit, value, contentManager);&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Since we are just declaring the card and not yet putting it in a deck we will be setting several of the properties to null, and then lastly we call another method to load the cards content based on the suit and value that we passed in.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;The cards Load method is detailed next:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public void LoadCard(CardSuit suit, CardValue value, ContentManager contentManager)&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (suit == CardSuit.Clubs || suit == CardSuit.Spades)&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TheColor = CardColor.Black;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TheColor = CardColor.Red;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Suit = suit;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Value = value;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Set default pos and size&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CardRectangle = new Rectangle(0, 0, CARD_WIDTH, CARD_HEIGHT);&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Card background&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cardBack = contentManager.Load&lt;texture2d&gt;(&quot;Cards/card_background&quot;);&lt;/texture2d&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CardName = suit.ToString() + &quot;_&quot; + value.ToString();&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; card = contentManager.Load&lt;texture2d&gt;(&quot;Cards/&quot; + CardName);&lt;/texture2d&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Based on the suit we first determine the cards color, Clubs/Spades are black and Hearts/Diamonds are red. We set the cards suit and value from the passed in parameters and then we create the rectangle that will hold the card texture. Next we load the cards background picture into its texture, and then after determine the cards name we load the card image into its texture.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Finally we have the method that will draw the card to the screen:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;b&gt;public void Draw(SpriteBatch theSpriteBatch)&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (IsTurned)&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (card != null)&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; theSpriteBatch.Draw(card, CardRectangle, Color.White);&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (cardBack != null)&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; theSpriteBatch.Draw(cardBack, CardRectangle, Color.White);&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Here we are&amp;nbsp;determining&amp;nbsp;if the card is face up or face down and drawing that particular image to the screen.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;That is it right now for our card class. In the future it will be&amp;nbsp;expanded&amp;nbsp;more to handle different input types like drag and drop but for now clicking on the card is all that is&amp;nbsp;necessary. &amp;nbsp;Also not the reason the card has no coordinates is because it&#39;s draw location will be based on the location of it&#39;s stack/deck. Stay tuned for the next part in the series where we will make a deck class.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://advancedmaster.blogspot.com/feeds/8663444181073999162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://advancedmaster.blogspot.com/2011/07/xna-tutorial-series-1-golf-patience_11.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2889659702655543132/posts/default/8663444181073999162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2889659702655543132/posts/default/8663444181073999162'/><link rel='alternate' type='text/html' href='http://advancedmaster.blogspot.com/2011/07/xna-tutorial-series-1-golf-patience_11.html' title='XNA Tutorial Series 1: Golf (Patience) Solitaire Part II - Card Class'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16519632441896564631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2889659702655543132.post-6924759330832134945</id><published>2011-07-11T10:07:00.000-07:00</published><updated>2011-07-11T10:07:37.047-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Game Programming"/><category scheme="http://www.blogger.com/atom/ns#" term="Solitaire"/><category scheme="http://www.blogger.com/atom/ns#" term="XNA"/><title type='text'>XNA Tutorial Series 1: Golf (Patience) Solitaire Part I - Project Setup</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Golf_(Patience)&quot;&gt;Golf Solitaire&lt;/a&gt; as described by &lt;a href=&quot;http://en.wikipedia.org/&quot;&gt;wikipedia&lt;/a&gt;:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;i&gt;Golf is a Patience game where players try to earn the lowest number of points (as in golf, the sport) over the course of nine deals (or &quot;holes&quot; to further use golfing teminology). It has a tableau of 35 face-up cards and a higher ratio of skill to luck than most other solitaire card games.&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;My attempts in this tutorial series will be able to keep the code reusable and hopefully build onto this series with other Card/Solitaire games.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;b&gt;&lt;u&gt;XNA Tutorial Series 1: Golf (Patience) Solitaire Part I - Project Setup&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;Start by creating a new XNA 4.0 Windows game project. In my sample I named the project &quot;Patience&quot; but you are free to name it whatever you like. Then in the main project right click the project and add a new folder called classes. This will be where we define our game logic.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl7OlrdnSHVCImrJr97xW3rrHayuRv_tiQID3LV-uC9AQRT9-kzSgZR2za-lC2qYFa9u8VyfiPOYh6OuQmD9htt5L-v4HyHeAAvETEzxt5Rr4ZymbwLSwtLNPrrHPaiT74lvjvrXFkzXme/s1600/project.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl7OlrdnSHVCImrJr97xW3rrHayuRv_tiQID3LV-uC9AQRT9-kzSgZR2za-lC2qYFa9u8VyfiPOYh6OuQmD9htt5L-v4HyHeAAvETEzxt5Rr4ZymbwLSwtLNPrrHPaiT74lvjvrXFkzXme/s1600/project.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Also in your Content Project right click and add &amp;nbsp;&quot;Cards&quot; and &quot;Fonts&quot; Directories. Where the actual game art will be stored. Right now that gives us the basis for starting our game. In the next tutorial we will focus on creating the Card class.&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://advancedmaster.blogspot.com/feeds/6924759330832134945/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://advancedmaster.blogspot.com/2011/07/xna-tutorial-series-1-golf-patience.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2889659702655543132/posts/default/6924759330832134945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2889659702655543132/posts/default/6924759330832134945'/><link rel='alternate' type='text/html' href='http://advancedmaster.blogspot.com/2011/07/xna-tutorial-series-1-golf-patience.html' title='XNA Tutorial Series 1: Golf (Patience) Solitaire Part I - Project Setup'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16519632441896564631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl7OlrdnSHVCImrJr97xW3rrHayuRv_tiQID3LV-uC9AQRT9-kzSgZR2za-lC2qYFa9u8VyfiPOYh6OuQmD9htt5L-v4HyHeAAvETEzxt5Rr4ZymbwLSwtLNPrrHPaiT74lvjvrXFkzXme/s72-c/project.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2889659702655543132.post-8933795461399597678</id><published>2011-07-07T08:32:00.001-07:00</published><updated>2011-07-07T08:32:23.835-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Games"/><category scheme="http://www.blogger.com/atom/ns#" term="Programming"/><category scheme="http://www.blogger.com/atom/ns#" term="XNA"/><title type='text'>XNA Tutorials</title><content type='html'>I will begin an XNA tutorial series here soon!!!</content><link rel='replies' type='application/atom+xml' href='http://advancedmaster.blogspot.com/feeds/8933795461399597678/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://advancedmaster.blogspot.com/2011/07/xna-tutorials.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2889659702655543132/posts/default/8933795461399597678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2889659702655543132/posts/default/8933795461399597678'/><link rel='alternate' type='text/html' href='http://advancedmaster.blogspot.com/2011/07/xna-tutorials.html' title='XNA Tutorials'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16519632441896564631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2889659702655543132.post-4260921093993483372</id><published>2010-02-13T12:12:00.000-08:00</published><updated>2010-02-13T12:12:30.689-08:00</updated><title type='text'>Webdesign tips</title><content type='html'>My&amp;nbsp;web host&amp;nbsp;just published some good web design tips &amp;amp; tricks that I thought i would share, you can find them here:&amp;nbsp;&lt;a href=&quot;http://cncwebsolutions.com/web-design-tips.html&quot;&gt;http://cncwebsolutions.com/web-design-tips.html&lt;/a&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #103f5a; font-family: Helvetica, Arial, sans-serif; font-size: 12px; line-height: 16px;&quot;&gt;&lt;div class=&quot;article-rel-wrapper&quot;&gt;&lt;h2 class=&quot;contentheading&quot; style=&quot;font-size: 23px; font-weight: normal; line-height: 32px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;8 Tips for Designing a Great Website&lt;/h2&gt;&lt;/div&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;1. Select a color scheme and stick to it.&lt;/strong&gt;&lt;div style=&quot;margin-bottom: 15px; margin-top: 10px;&quot;&gt;If your company has a logo or preferred colours on its stationery that’s a good start. For those of you starting from scratch, choose two or three complementary colours and stick with them – don’t change colours on every page.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-top: 10px;&quot;&gt;The most common colour schemes include:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-top: 10px;&quot;&gt;- Red, yellow and white&lt;br /&gt;
- Blue and white&lt;br /&gt;
- Red, grey and white&lt;br /&gt;
- Blue, orange and white&lt;br /&gt;
- Yellow, grey and white.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-top: 10px;&quot;&gt;If you’re not sure what colour scheme to choose, surf the internet and find a website that you like. You can then model your colour scheme on what already exists.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-top: 10px;&quot;&gt;&lt;strong&gt;2. Use templates.&lt;/strong&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-top: 10px;&quot;&gt;Can’t find a website you really like? Another option is to choose a template. There are many templates or pre-set designs. These come as part of your web design software (such as FrontPage) or you can check out some websites that specialise in designing templates.&lt;/div&gt;&lt;strong&gt;3. Provide an easy to use navigation system.&lt;/strong&gt;&lt;div style=&quot;margin-bottom: 15px; margin-top: 10px;&quot;&gt;This is one of the most important issues to consider when designing a website. You need to ensure your visitors can find what they are looking for easily. Most websites either display their navigation bar on the left or at the top. And since most people are used to this type of navigation, it’s best to stick with it.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-top: 10px;&quot;&gt;It also helps to include your navigation bar at the bottom of each page to save your visitors from having to scroll back to the top.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-top: 10px;&quot;&gt;&lt;strong&gt;4. Don’t go overboard on special effects&lt;/strong&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-top: 10px;&quot;&gt;Whilst it is ok to have one or two special effects to jazz up your website, spinning graphics and logos often distract your visitor from the content, not to mention they can take too long to download. Your visitors may click away even before your spinning logo finishes loading.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-top: 10px;&quot;&gt;&lt;br /&gt;
&lt;strong&gt;5. Backgrounds&lt;/strong&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-top: 10px;&quot;&gt;Ensure your visitors can read the text on the background, ie. no black writing on dark blue background or yellow on white. Also be careful that your links are visible before and after being visited. The default for links in most programs is blue (before being visited) and burgundy (after being visited), so if you have a dark background, ensure your links are light.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-top: 10px;&quot;&gt;&lt;strong&gt;6. External Links&lt;/strong&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-top: 10px;&quot;&gt;It is a good idea to open links to other websites in a new window. That way your visitors can easily return to your site when they are finished browsing the external link&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-top: 10px;&quot;&gt;&lt;strong&gt;7. Site Map &amp;amp; Search Feature&lt;/strong&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-top: 10px;&quot;&gt;If you website is more than 15 pages, it is useful to have a site map or a “Search” feature to ensure your visitors can easily find what they’re looking for.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-top: 10px;&quot;&gt;&lt;strong&gt;8. Content is King&lt;/strong&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-top: 10px;&quot;&gt;While it is important that your website looks clean and professional, it is far more important that you concentrate your efforts on the content and promotion.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-top: 10px;&quot;&gt;If you want a professional website, things to stay away from include:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-top: 10px;&quot;&gt;1. Flash intros, revolving globes, bevelled line separators, animated mail boxes&lt;br /&gt;
2. Loads of pop up or pop under boxes&lt;br /&gt;
3. Autoplay music. Allow your customer to play music only if they choose.&lt;br /&gt;
4. Hit counters of the free variety, which say “you are 27th visitor”&lt;br /&gt;
5. Date and time stamps, unless your website is updated daily or weekly&lt;br /&gt;
6. Busy backgrounds.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-top: 10px;&quot;&gt;If you&#39;d like to sit back and relax let us do the hard work for you,&amp;nbsp;&lt;a href=&quot;http://cncwebsolutions.com/contact-us.html?view=message&amp;amp;layout=message&amp;amp;pf=1&quot; style=&quot;color: #c51019; text-decoration: none;&quot;&gt;contact CNC Web Solutions for a free quote&lt;/a&gt;&lt;a href=&quot;http://cncwebsolutions.com/contact-us.html&quot; style=&quot;color: #c51019; text-decoration: none;&quot;&gt;!&lt;/a&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://advancedmaster.blogspot.com/feeds/4260921093993483372/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://advancedmaster.blogspot.com/2010/02/webdesign-tips.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2889659702655543132/posts/default/4260921093993483372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2889659702655543132/posts/default/4260921093993483372'/><link rel='alternate' type='text/html' href='http://advancedmaster.blogspot.com/2010/02/webdesign-tips.html' title='Webdesign tips'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16519632441896564631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2889659702655543132.post-8313690405199913943</id><published>2010-02-12T18:26:00.001-08:00</published><updated>2010-02-12T18:26:12.818-08:00</updated><title type='text'>fbfcn</title><content type='html'>Everyone needs a little more&amp;nbsp;&lt;a href=&quot;http://fbfcn.com/&quot;&gt;fbfcn&lt;/a&gt;&amp;nbsp;in there life</content><link rel='replies' type='application/atom+xml' href='http://advancedmaster.blogspot.com/feeds/8313690405199913943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://advancedmaster.blogspot.com/2010/02/fbfcn.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2889659702655543132/posts/default/8313690405199913943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2889659702655543132/posts/default/8313690405199913943'/><link rel='alternate' type='text/html' href='http://advancedmaster.blogspot.com/2010/02/fbfcn.html' title='fbfcn'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16519632441896564631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2889659702655543132.post-2359338928270780515</id><published>2009-11-12T07:15:00.001-08:00</published><updated>2009-11-12T07:15:27.675-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Anouncement"/><title type='text'>Exam</title><content type='html'>Busy studying for an exam, no blog posts for about a week (MS 70-432)</content><link rel='replies' type='application/atom+xml' href='http://advancedmaster.blogspot.com/feeds/2359338928270780515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://advancedmaster.blogspot.com/2009/11/exam.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2889659702655543132/posts/default/2359338928270780515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2889659702655543132/posts/default/2359338928270780515'/><link rel='alternate' type='text/html' href='http://advancedmaster.blogspot.com/2009/11/exam.html' title='Exam'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16519632441896564631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2889659702655543132.post-7869962223962102565</id><published>2009-11-02T11:07:00.000-08:00</published><updated>2009-11-02T11:07:45.068-08:00</updated><title type='text'>ASP.NET Menu</title><content type='html'>So I wanted a menu that didnt involve redirects, and really liked the idea of just switching out a user control.&lt;br /&gt;
&lt;br /&gt;
So my approach that works for what i needed:&lt;br /&gt;
&lt;br /&gt;
protected void Menu1_MenuItemClick(object sender, MenuEventArgs e)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ContentPlaceHolder mpContentPlaceHolder;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mpContentPlaceHolder = (ContentPlaceHolder)this.FindControl(”cphMaster”);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (mpContentPlaceHolder != null)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (Control userControl in mpContentPlaceHolder.Controls)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (userControl.GetType() != typeof(LiteralControl)) //hide all controls&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; userControl.Visible = false;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Control uc;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; switch (e.Item.Value)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case “Home” : //menu command&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uc = mpContentPlaceHolder.FindControl(”ucStatus”);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uc.Visible = true;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //etc….&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
so basically every time a menuitem is clicked all user controls are hidden and the menuitem that was selected becomes the visible control.</content><link rel='replies' type='application/atom+xml' href='http://advancedmaster.blogspot.com/feeds/7869962223962102565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://advancedmaster.blogspot.com/2009/11/aspnet-menu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2889659702655543132/posts/default/7869962223962102565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2889659702655543132/posts/default/7869962223962102565'/><link rel='alternate' type='text/html' href='http://advancedmaster.blogspot.com/2009/11/aspnet-menu.html' title='ASP.NET Menu'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16519632441896564631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>