Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Text;
- namespace ConsoleApp3
- {
- class Hangman
- {
- public static string getImage(int points)
- {
- string[] hangman = File.ReadAllLines(@"C:\Users\scancar\Desktop\sibenice.txt");
- List<string> images = new List<string>();
- string image = "";
- foreach (string s in hangman)
- {
- if (s.Length < 1)
- {
- images.Add(image);
- image = "";
- }
- else
- image += s + "\n";
- }
- images.Add(image);
- return images[points];
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement