SlideShare una empresa de Scribd logo
1 de 7
using System.Threading;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Bingo
{
public delegate void DrawNumberEventHandler(object sender, NumberDrawnEventArgs args);
public static class Utils
{
public static Stack<int> GetRandomList(int listcount, int min, int max)
{
Stack<int> list = new Stack<int>();
List<int> ints = new List<int>();
Thread.Sleep(1);
Random rd = new Random(DateTime.Now.Millisecond);
for (int i = min; i < max + 1; i++)
{
ints.Add(i);
}
for (int i = 1; i <= listcount; i++)
{
int pick = rd.Next(1, max - min + 3 - i);
list.Push(ints.ElementAt(pick - 1));
ints.RemoveAt(pick - 1);
}
list.Reverse();
return list;
}
}
public class BingoCell
{
private int row;
private int column;
private int value;
private bool ismarked;
public BingoCell(int row, int column, int value)
{
this.row = row;
this.column = column;
this.value = value;
this.ismarked = false;
}
/*public int this[int row, int col]
{
}*/
public void Mark()
{
ismarked = true;
}
public bool IsMarked
{
get { return ismarked; }
}
public int Row
{
get { return row; }
}
public int Column
{
get { return column; }
}
public int Value
{
get { return value; }
}
}
public class Card
{
private BingoCell[,] cells = new BingoCell[5, 5];
private int[] rowcount = new int[5];
private int[] colcount = new int[5];
private Game game;
public Card(Game game)
{
Initialize(game);
}
public void ShowCard()
{
for (int i = 0; i < 5; i++)
{
for (int j = 0; j < 5; j++)
{
if (j == 0) Console.WriteLine();
Console.Write(cells[j, i].Value.ToString() + 't');
}
}
Console.WriteLine();
}
public void Initialize(Game _game)
{
this.game = _game;
game.NumberDrawnEvent += NumberDrawn;
Stack<int>[] stack = new Stack<int>[5];
for (int i = 1; i <= 5; i++)
{
stack[i - 1] = Utils.GetRandomList(5, i * 15 - 14, i * 15);
}
for (int col = 1; col <= 5; col++)
{
for (int row = 1; row <= 5; row++)
{
if (row == 3 && col == 3)
{
stack[row - 1].Pop();
cells[row - 1, col - 1] = new BingoCell(row, col, 0);
}
else
{
cells[row - 1, col - 1] = new BingoCell(row, col, stack[row - 1].Pop());
}
}
}
}
public byte MarkedCount
{
private set;
get;
}
public event EventHandler BingoComplete;
private void NumberDrawn(object sender, NumberDrawnEventArgs args)
{
int col = ((args.NumberDrawn - 1) / 15);
for (int row = 0; row < 5; row++)
{
if (cells[col, row].Value == args.NumberDrawn)
{
BingoCell square = cells[col, row];
square.Mark();
MarkedCount++;
if (MarkedCount == 24 && BingoComplete != null)
BingoComplete(this, new EventArgs());
rowcount[row]++;
colcount[col]++;
break;
}
}
}
}
public class Player
{
private List<Card> cards;
private Game game;
public Player(Game game)
{
this.game = game;
}
public string Name { get; set; }
public void BuyCards(int numberofcards)
{
List<Card> cards = new List<Card>();
Card card;
for (int i = 1; i <= numberofcards; i++)
{
card = new Card(game);
card.BingoComplete += Bingo;
cards.Add(card);
}
this.cards = cards;
}
public event EventHandler BingoComplete;
private void Bingo(object sender, EventArgs e)
{
if (BingoComplete != null)
BingoComplete(this, e);
}
public void ShowCards()
{
foreach (Card card in Cards)
{
card.ShowCard();
}
Console.Read();
}
public List<Card> Cards
{
get { return cards; }
}
}
public class NumberDrawnEventArgs : EventArgs
{
public int NumberDrawn { get; private set; }
public NumberDrawnEventArgs(int numberdrawn)
{
this.NumberDrawn = numberdrawn;
}
}
public class Game
{
private Stack<int> numbers;
Stack<int> originalnumbers;
private List<Player> players = new List<Player>();
public event DrawNumberEventHandler NumberDrawnEvent;
public Game()
{
numbers = Utils.GetRandomList(75, 1, 75);
originalnumbers = new Stack<int>(numbers);
}
public Stack<int> Numbers
{
get { return numbers; }
}
public Player AddPlayer(string name, int numberofcards)
{
Player player = new Player(this);
player.Name = name;
player.BuyCards(numberofcards);
players.Add(player);
return player;
}
public int Draw()
{
int numberdrawn = numbers.Pop();
if (NumberDrawnEvent != null)
NumberDrawnEvent(this, new NumberDrawnEventArgs(numberdrawn));
return numberdrawn;
}
}
class Program
{
static bool BingoCalled = false;
static void Main(string[] args)
{
Game gm = new Game();
Player player = gm.AddPlayer("Henry", 100);
player.BingoComplete += BingoComplete;
while (!BingoCalled)
{
Console.Write(gm.Draw().ToString("D" + 2) + ",");
}
player.ShowCards();
Console.ReadLine();
}
private static void BingoComplete(object sender, EventArgs e)
{
Console.WriteLine("Bingo");
BingoCalled = true;
Console.Read();
//System.Environment.Exit(1);
}
}
}
}
player.ShowCards();
Console.ReadLine();
}
private static void BingoComplete(object sender, EventArgs e)
{
Console.WriteLine("Bingo");
BingoCalled = true;
Console.Read();
//System.Environment.Exit(1);
}
}
}

Más contenido relacionado

La actualidad más candente

The Ring programming language version 1.4 book - Part 8 of 30
The Ring programming language version 1.4 book - Part 8 of 30The Ring programming language version 1.4 book - Part 8 of 30
The Ring programming language version 1.4 book - Part 8 of 30Mahmoud Samir Fayed
 
The Ring programming language version 1.5.2 book - Part 29 of 181
The Ring programming language version 1.5.2 book - Part 29 of 181The Ring programming language version 1.5.2 book - Part 29 of 181
The Ring programming language version 1.5.2 book - Part 29 of 181Mahmoud Samir Fayed
 
The Ring programming language version 1.5 book - Part 8 of 31
The Ring programming language version 1.5 book - Part 8 of 31The Ring programming language version 1.5 book - Part 8 of 31
The Ring programming language version 1.5 book - Part 8 of 31Mahmoud Samir Fayed
 
The Ring programming language version 1.7 book - Part 48 of 196
The Ring programming language version 1.7 book - Part 48 of 196The Ring programming language version 1.7 book - Part 48 of 196
The Ring programming language version 1.7 book - Part 48 of 196Mahmoud Samir Fayed
 
The Ring programming language version 1.3 book - Part 83 of 88
The Ring programming language version 1.3 book - Part 83 of 88The Ring programming language version 1.3 book - Part 83 of 88
The Ring programming language version 1.3 book - Part 83 of 88Mahmoud Samir Fayed
 
Низкоуровневые оптимизации .NET-приложений
Низкоуровневые оптимизации .NET-приложенийНизкоуровневые оптимизации .NET-приложений
Низкоуровневые оптимизации .NET-приложенийAndrey Akinshin
 
ECMAScript 6 major changes
ECMAScript 6 major changesECMAScript 6 major changes
ECMAScript 6 major changeshayato
 
The Ring programming language version 1.3 book - Part 32 of 88
The Ring programming language version 1.3 book - Part 32 of 88The Ring programming language version 1.3 book - Part 32 of 88
The Ring programming language version 1.3 book - Part 32 of 88Mahmoud Samir Fayed
 
The Ring programming language version 1.2 book - Part 13 of 84
The Ring programming language version 1.2 book - Part 13 of 84The Ring programming language version 1.2 book - Part 13 of 84
The Ring programming language version 1.2 book - Part 13 of 84Mahmoud Samir Fayed
 
The Ring programming language version 1.9 book - Part 38 of 210
The Ring programming language version 1.9 book - Part 38 of 210The Ring programming language version 1.9 book - Part 38 of 210
The Ring programming language version 1.9 book - Part 38 of 210Mahmoud Samir Fayed
 
The Ring programming language version 1.6 book - Part 183 of 189
The Ring programming language version 1.6 book - Part 183 of 189The Ring programming language version 1.6 book - Part 183 of 189
The Ring programming language version 1.6 book - Part 183 of 189Mahmoud Samir Fayed
 
The Ring programming language version 1.7 book - Part 28 of 196
The Ring programming language version 1.7 book - Part 28 of 196The Ring programming language version 1.7 book - Part 28 of 196
The Ring programming language version 1.7 book - Part 28 of 196Mahmoud Samir Fayed
 
The Ring programming language version 1.6 book - Part 55 of 189
The Ring programming language version 1.6 book - Part 55 of 189The Ring programming language version 1.6 book - Part 55 of 189
The Ring programming language version 1.6 book - Part 55 of 189Mahmoud Samir Fayed
 
Numerical Method Assignment
Numerical Method AssignmentNumerical Method Assignment
Numerical Method Assignmentashikul akash
 
The Ring programming language version 1.5.4 book - Part 42 of 185
The Ring programming language version 1.5.4 book - Part 42 of 185The Ring programming language version 1.5.4 book - Part 42 of 185
The Ring programming language version 1.5.4 book - Part 42 of 185Mahmoud Samir Fayed
 
Python seaborn cheat_sheet
Python seaborn cheat_sheetPython seaborn cheat_sheet
Python seaborn cheat_sheetNishant Upadhyay
 
The Ring programming language version 1.6 book - Part 32 of 189
The Ring programming language version 1.6 book - Part 32 of 189The Ring programming language version 1.6 book - Part 32 of 189
The Ring programming language version 1.6 book - Part 32 of 189Mahmoud Samir Fayed
 

La actualidad más candente (20)

The Ring programming language version 1.4 book - Part 8 of 30
The Ring programming language version 1.4 book - Part 8 of 30The Ring programming language version 1.4 book - Part 8 of 30
The Ring programming language version 1.4 book - Part 8 of 30
 
The Ring programming language version 1.5.2 book - Part 29 of 181
The Ring programming language version 1.5.2 book - Part 29 of 181The Ring programming language version 1.5.2 book - Part 29 of 181
The Ring programming language version 1.5.2 book - Part 29 of 181
 
The Ring programming language version 1.5 book - Part 8 of 31
The Ring programming language version 1.5 book - Part 8 of 31The Ring programming language version 1.5 book - Part 8 of 31
The Ring programming language version 1.5 book - Part 8 of 31
 
Python bokeh cheat_sheet
Python bokeh cheat_sheet Python bokeh cheat_sheet
Python bokeh cheat_sheet
 
The Ring programming language version 1.7 book - Part 48 of 196
The Ring programming language version 1.7 book - Part 48 of 196The Ring programming language version 1.7 book - Part 48 of 196
The Ring programming language version 1.7 book - Part 48 of 196
 
The Ring programming language version 1.3 book - Part 83 of 88
The Ring programming language version 1.3 book - Part 83 of 88The Ring programming language version 1.3 book - Part 83 of 88
The Ring programming language version 1.3 book - Part 83 of 88
 
Низкоуровневые оптимизации .NET-приложений
Низкоуровневые оптимизации .NET-приложенийНизкоуровневые оптимизации .NET-приложений
Низкоуровневые оптимизации .NET-приложений
 
ECMAScript 6 major changes
ECMAScript 6 major changesECMAScript 6 major changes
ECMAScript 6 major changes
 
The Ring programming language version 1.3 book - Part 32 of 88
The Ring programming language version 1.3 book - Part 32 of 88The Ring programming language version 1.3 book - Part 32 of 88
The Ring programming language version 1.3 book - Part 32 of 88
 
The Ring programming language version 1.2 book - Part 13 of 84
The Ring programming language version 1.2 book - Part 13 of 84The Ring programming language version 1.2 book - Part 13 of 84
The Ring programming language version 1.2 book - Part 13 of 84
 
Tugas struktur data terakhir_pohonBiner
Tugas struktur data terakhir_pohonBinerTugas struktur data terakhir_pohonBiner
Tugas struktur data terakhir_pohonBiner
 
The Ring programming language version 1.9 book - Part 38 of 210
The Ring programming language version 1.9 book - Part 38 of 210The Ring programming language version 1.9 book - Part 38 of 210
The Ring programming language version 1.9 book - Part 38 of 210
 
The Ring programming language version 1.6 book - Part 183 of 189
The Ring programming language version 1.6 book - Part 183 of 189The Ring programming language version 1.6 book - Part 183 of 189
The Ring programming language version 1.6 book - Part 183 of 189
 
The Ring programming language version 1.7 book - Part 28 of 196
The Ring programming language version 1.7 book - Part 28 of 196The Ring programming language version 1.7 book - Part 28 of 196
The Ring programming language version 1.7 book - Part 28 of 196
 
The Ring programming language version 1.6 book - Part 55 of 189
The Ring programming language version 1.6 book - Part 55 of 189The Ring programming language version 1.6 book - Part 55 of 189
The Ring programming language version 1.6 book - Part 55 of 189
 
Numerical Method Assignment
Numerical Method AssignmentNumerical Method Assignment
Numerical Method Assignment
 
The Ring programming language version 1.5.4 book - Part 42 of 185
The Ring programming language version 1.5.4 book - Part 42 of 185The Ring programming language version 1.5.4 book - Part 42 of 185
The Ring programming language version 1.5.4 book - Part 42 of 185
 
Python seaborn cheat_sheet
Python seaborn cheat_sheetPython seaborn cheat_sheet
Python seaborn cheat_sheet
 
Caropro
CaroproCaropro
Caropro
 
The Ring programming language version 1.6 book - Part 32 of 189
The Ring programming language version 1.6 book - Part 32 of 189The Ring programming language version 1.6 book - Part 32 of 189
The Ring programming language version 1.6 book - Part 32 of 189
 

Similar a BingoConsoleApp

GameOfLife.cs using System; using System.Collections.Generic;.pdf
GameOfLife.cs using System; using System.Collections.Generic;.pdfGameOfLife.cs using System; using System.Collections.Generic;.pdf
GameOfLife.cs using System; using System.Collections.Generic;.pdfaravlitraders2012
 
Please help me make a UML for Java! Look at the code below and make a.docx
Please help me make a UML for Java! Look at the code below and make a.docxPlease help me make a UML for Java! Look at the code below and make a.docx
Please help me make a UML for Java! Look at the code below and make a.docxJakeT2gGrayp
 
package com.tictactoe; public class Main {public void play() {.pdf
package com.tictactoe; public class Main {public void play() {.pdfpackage com.tictactoe; public class Main {public void play() {.pdf
package com.tictactoe; public class Main {public void play() {.pdfinfo430661
 
The main class of the tictoe game looks like.public class Main {.pdf
The main class of the tictoe game looks like.public class Main {.pdfThe main class of the tictoe game looks like.public class Main {.pdf
The main class of the tictoe game looks like.public class Main {.pdfasif1401
 
import java.util.Scanner;public class Main {    public static in.pdf
import java.util.Scanner;public class Main {    public static in.pdfimport java.util.Scanner;public class Main {    public static in.pdf
import java.util.Scanner;public class Main {    public static in.pdfanwarsadath111
 
Java Simple Programs
Java Simple ProgramsJava Simple Programs
Java Simple ProgramsUpender Upr
 
It is the main program that implement the min(), max(), floor(), cei.pdf
It is the main program that implement the min(), max(), floor(), cei.pdfIt is the main program that implement the min(), max(), floor(), cei.pdf
It is the main program that implement the min(), max(), floor(), cei.pdfannaindustries
 
An object of class StatCalc can be used to compute several simp.pdf
 An object of class StatCalc can be used to compute several simp.pdf An object of class StatCalc can be used to compute several simp.pdf
An object of class StatCalc can be used to compute several simp.pdfaravlitraders2012
 
QA Auotmation Java programs,theory
QA Auotmation Java programs,theory QA Auotmation Java programs,theory
QA Auotmation Java programs,theory archana singh
 
Consider the DealHands code import javautilScanner impor.pdf
Consider the DealHands code import javautilScanner impor.pdfConsider the DealHands code import javautilScanner impor.pdf
Consider the DealHands code import javautilScanner impor.pdfabhishekhcollection
 
Example of JAVA Program
Example of JAVA ProgramExample of JAVA Program
Example of JAVA ProgramTrenton Asbury
 
Java binary subtraction
Java binary subtractionJava binary subtraction
Java binary subtractionCharm Sasi
 
I dont know what is wrong with this roulette program I cant seem.pdf
I dont know what is wrong with this roulette program I cant seem.pdfI dont know what is wrong with this roulette program I cant seem.pdf
I dont know what is wrong with this roulette program I cant seem.pdfarchanaemporium
 
Computer_Practicals-file.doc.pdf
Computer_Practicals-file.doc.pdfComputer_Practicals-file.doc.pdf
Computer_Practicals-file.doc.pdfHIMANSUKUMAR12
 

Similar a BingoConsoleApp (20)

GameOfLife.cs using System; using System.Collections.Generic;.pdf
GameOfLife.cs using System; using System.Collections.Generic;.pdfGameOfLife.cs using System; using System.Collections.Generic;.pdf
GameOfLife.cs using System; using System.Collections.Generic;.pdf
 
Please help me make a UML for Java! Look at the code below and make a.docx
Please help me make a UML for Java! Look at the code below and make a.docxPlease help me make a UML for Java! Look at the code below and make a.docx
Please help me make a UML for Java! Look at the code below and make a.docx
 
package com.tictactoe; public class Main {public void play() {.pdf
package com.tictactoe; public class Main {public void play() {.pdfpackage com.tictactoe; public class Main {public void play() {.pdf
package com.tictactoe; public class Main {public void play() {.pdf
 
The main class of the tictoe game looks like.public class Main {.pdf
The main class of the tictoe game looks like.public class Main {.pdfThe main class of the tictoe game looks like.public class Main {.pdf
The main class of the tictoe game looks like.public class Main {.pdf
 
PRACTICAL COMPUTING
PRACTICAL COMPUTINGPRACTICAL COMPUTING
PRACTICAL COMPUTING
 
import java.util.Scanner;public class Main {    public static in.pdf
import java.util.Scanner;public class Main {    public static in.pdfimport java.util.Scanner;public class Main {    public static in.pdf
import java.util.Scanner;public class Main {    public static in.pdf
 
adp lab.docx
adp lab.docxadp lab.docx
adp lab.docx
 
Java Simple Programs
Java Simple ProgramsJava Simple Programs
Java Simple Programs
 
.net progrmming part2
.net progrmming part2.net progrmming part2
.net progrmming part2
 
The Art of Clean Code
The Art of Clean CodeThe Art of Clean Code
The Art of Clean Code
 
It is the main program that implement the min(), max(), floor(), cei.pdf
It is the main program that implement the min(), max(), floor(), cei.pdfIt is the main program that implement the min(), max(), floor(), cei.pdf
It is the main program that implement the min(), max(), floor(), cei.pdf
 
An object of class StatCalc can be used to compute several simp.pdf
 An object of class StatCalc can be used to compute several simp.pdf An object of class StatCalc can be used to compute several simp.pdf
An object of class StatCalc can be used to compute several simp.pdf
 
QA Auotmation Java programs,theory
QA Auotmation Java programs,theory QA Auotmation Java programs,theory
QA Auotmation Java programs,theory
 
Consider the DealHands code import javautilScanner impor.pdf
Consider the DealHands code import javautilScanner impor.pdfConsider the DealHands code import javautilScanner impor.pdf
Consider the DealHands code import javautilScanner impor.pdf
 
Example of JAVA Program
Example of JAVA ProgramExample of JAVA Program
Example of JAVA Program
 
Java binary subtraction
Java binary subtractionJava binary subtraction
Java binary subtraction
 
I dont know what is wrong with this roulette program I cant seem.pdf
I dont know what is wrong with this roulette program I cant seem.pdfI dont know what is wrong with this roulette program I cant seem.pdf
I dont know what is wrong with this roulette program I cant seem.pdf
 
Property-based testing
Property-based testingProperty-based testing
Property-based testing
 
C programs
C programsC programs
C programs
 
Computer_Practicals-file.doc.pdf
Computer_Practicals-file.doc.pdfComputer_Practicals-file.doc.pdf
Computer_Practicals-file.doc.pdf
 

BingoConsoleApp

  • 1. using System.Threading; using System; using System.Collections.Generic; using System.Linq; namespace Bingo { public delegate void DrawNumberEventHandler(object sender, NumberDrawnEventArgs args); public static class Utils { public static Stack<int> GetRandomList(int listcount, int min, int max) { Stack<int> list = new Stack<int>(); List<int> ints = new List<int>(); Thread.Sleep(1); Random rd = new Random(DateTime.Now.Millisecond); for (int i = min; i < max + 1; i++) { ints.Add(i); } for (int i = 1; i <= listcount; i++) { int pick = rd.Next(1, max - min + 3 - i); list.Push(ints.ElementAt(pick - 1)); ints.RemoveAt(pick - 1); } list.Reverse(); return list; } } public class BingoCell { private int row; private int column; private int value; private bool ismarked; public BingoCell(int row, int column, int value) { this.row = row; this.column = column; this.value = value; this.ismarked = false; } /*public int this[int row, int col] { }*/ public void Mark()
  • 2. { ismarked = true; } public bool IsMarked { get { return ismarked; } } public int Row { get { return row; } } public int Column { get { return column; } } public int Value { get { return value; } } } public class Card { private BingoCell[,] cells = new BingoCell[5, 5]; private int[] rowcount = new int[5]; private int[] colcount = new int[5]; private Game game; public Card(Game game) { Initialize(game); } public void ShowCard() { for (int i = 0; i < 5; i++) { for (int j = 0; j < 5; j++) { if (j == 0) Console.WriteLine(); Console.Write(cells[j, i].Value.ToString() + 't'); } } Console.WriteLine(); } public void Initialize(Game _game) { this.game = _game; game.NumberDrawnEvent += NumberDrawn;
  • 3. Stack<int>[] stack = new Stack<int>[5]; for (int i = 1; i <= 5; i++) { stack[i - 1] = Utils.GetRandomList(5, i * 15 - 14, i * 15); } for (int col = 1; col <= 5; col++) { for (int row = 1; row <= 5; row++) { if (row == 3 && col == 3) { stack[row - 1].Pop(); cells[row - 1, col - 1] = new BingoCell(row, col, 0); } else { cells[row - 1, col - 1] = new BingoCell(row, col, stack[row - 1].Pop()); } } } } public byte MarkedCount { private set; get; } public event EventHandler BingoComplete; private void NumberDrawn(object sender, NumberDrawnEventArgs args) { int col = ((args.NumberDrawn - 1) / 15); for (int row = 0; row < 5; row++) { if (cells[col, row].Value == args.NumberDrawn) { BingoCell square = cells[col, row]; square.Mark(); MarkedCount++; if (MarkedCount == 24 && BingoComplete != null) BingoComplete(this, new EventArgs()); rowcount[row]++; colcount[col]++; break; } } } } public class Player
  • 4. { private List<Card> cards; private Game game; public Player(Game game) { this.game = game; } public string Name { get; set; } public void BuyCards(int numberofcards) { List<Card> cards = new List<Card>(); Card card; for (int i = 1; i <= numberofcards; i++) { card = new Card(game); card.BingoComplete += Bingo; cards.Add(card); } this.cards = cards; } public event EventHandler BingoComplete; private void Bingo(object sender, EventArgs e) { if (BingoComplete != null) BingoComplete(this, e); } public void ShowCards() { foreach (Card card in Cards) { card.ShowCard(); } Console.Read(); } public List<Card> Cards { get { return cards; } } } public class NumberDrawnEventArgs : EventArgs { public int NumberDrawn { get; private set; } public NumberDrawnEventArgs(int numberdrawn) { this.NumberDrawn = numberdrawn;
  • 5. } } public class Game { private Stack<int> numbers; Stack<int> originalnumbers; private List<Player> players = new List<Player>(); public event DrawNumberEventHandler NumberDrawnEvent; public Game() { numbers = Utils.GetRandomList(75, 1, 75); originalnumbers = new Stack<int>(numbers); } public Stack<int> Numbers { get { return numbers; } } public Player AddPlayer(string name, int numberofcards) { Player player = new Player(this); player.Name = name; player.BuyCards(numberofcards); players.Add(player); return player; } public int Draw() { int numberdrawn = numbers.Pop(); if (NumberDrawnEvent != null) NumberDrawnEvent(this, new NumberDrawnEventArgs(numberdrawn)); return numberdrawn; } } class Program { static bool BingoCalled = false; static void Main(string[] args) { Game gm = new Game(); Player player = gm.AddPlayer("Henry", 100); player.BingoComplete += BingoComplete; while (!BingoCalled) { Console.Write(gm.Draw().ToString("D" + 2) + ",");
  • 6. } player.ShowCards(); Console.ReadLine(); } private static void BingoComplete(object sender, EventArgs e) { Console.WriteLine("Bingo"); BingoCalled = true; Console.Read(); //System.Environment.Exit(1); } } }
  • 7. } player.ShowCards(); Console.ReadLine(); } private static void BingoComplete(object sender, EventArgs e) { Console.WriteLine("Bingo"); BingoCalled = true; Console.Read(); //System.Environment.Exit(1); } } }