Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- /// <summary>
- /// Object Class for a Card
- /// </summary>
- public class Card
- {
- private string face;
- private string suit;
- /// <summary>
- /// Initiates the Class.
- /// </summary>
- /// <param name="face">string</param>
- /// <param name="suit">string</param>
- public Card(string face, string suit)
- {
- // Neat Stuff happens here with the "this" Keyword
- this.face = face;
- this.suit = suit;
- }
- /// <summary>
- /// Returns readable Stuff instead of "Class.Card"
- /// </summary>
- /// <returns>string: x of y</returns>
- /// <remarks>
- /// https://www.dotnetperls.com/override
- /// </remarks>
- public override string ToString()
- {
- return this.face + " of " + this.suit;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment