Advertisement
Layvu

OOP2. Карточная игра «Дурак»

Nov 16th, 2022
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.98 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. namespace CardGame
  5. {
  6.     class Card
  7.     {
  8.         public int Score;
  9.         public string Mark;
  10.     }
  11.  
  12.     static class GameRules
  13.     {
  14.         static string Rules = "";
  15.     }
  16.  
  17.     class Player
  18.     {
  19.         public string Name;
  20.         public BoxOfCards CountCardsOnHand;
  21.        
  22.         public Card Move(int numberOfCard)
  23.         {
  24.             return CountCardsOnHand.Cards[numberOfCard];
  25.         }
  26.     }
  27.  
  28.     static class GameMatch
  29.     {
  30.         static string SpecialCardMark;
  31.         static Player[] Players;
  32.     }
  33.  
  34.     class Table
  35.     {
  36.         public BoxOfCards Deck;
  37.  
  38.         public BoxOfCards Move1;
  39.         public BoxOfCards Move2;
  40.  
  41.         public BoxOfCards Beaten;
  42.     }
  43.    
  44.     class BoxOfCards
  45.     {
  46.         public Card[] Cards;
  47.         public int CountCards => Cards.Length;
  48.     }
  49.  
  50.     class Deck
  51.     {
  52.         public Stack<Card> cards;
  53.         public int CountCards => cards.Count;
  54.     }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement