Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace BetDogsHeadFirst
- {
- public class Bet
- {
- public int amount;
- public int dog;
- public Guy bettor;
- public string GetDescription()
- {
- string labelBetDescription = "";
- if(amount>0)
- {
- labelBetDescription = bettor.name + " bet " + amount + "on dog #" + dog;
- }
- else
- {
- labelBetDescription= bettor.name + " hasn't place a bet";
- }
- return labelBetDescription;
- }
- public int PayOut(int winner)
- {
- if (dog == winner)
- return amount;
- else
- return -amount;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment