C#/수업과제
-
텍스트 Rpg만들기C#/수업과제 2022. 6. 21. 18:00
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; using System.IO; namespace Study09 { public class Game { private Character user; public Game() { this.LoadDatas(); if (this.IsNewbie()) { this.CreateCharacter(); } else { Character character = new Character(this.LoadCharacterInfo()); user = character; } user...
-
데이터 저장 연습과제C#/수업과제 2022. 6. 20. 02:38
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO; using Newtonsoft.Json; namespace Homework { public class App { public Dictionary DicItem; //생성자 public App() { string item_json = File.ReadAllText("./item_data.json"); ItemData[] arrItemDatas = JsonConvert.DeserializeObject(item_json); Dictionary dicItem = arrItemD..
-
2차원 배열의 늑대와 영웅C#/수업과제 2022. 6. 15. 18:01
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Study05 { public class App { //생산자 public App() { new Game(); } } } using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Study05 { public class Game { public Game() { Map map = new Map(); map.ReadMap..
-
2048게임C#/수업과제 2022. 6. 15. 13:22
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace _2048Game_practice { internal class App { public App() { Game game = new Game(); game.Start(); game.Print(); game.StartMoveLeft(); game.Print(); game.AddNum(); game.Print(); Console.WriteLine(); game.StartMoveLeft(); game.Print(); game.AddNum(); game.Print(); Console.Writ..
-
for문 연습 문제C#/수업과제 2022. 6. 10. 17:38
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Study02 { internal class Program { static void Main(string[] args) { int monsterHp = 10; int heroDamage = 2; Console.WriteLine("몇회 공격 하시겠습니까?"); string input = Console.ReadLine(); int attackTimes = Convert.ToInt32(input); for (int i = 0; i < attackTimes; i++) { monsterHp ..
-
디아블로 아이템 출력하기C#/수업과제 2022. 6. 9. 17:32
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Study01 { internal class Program { static void Main(string[] args) { //아이템 이름 //VEIL OF STEEL string itemName1 = "VEIL OF STEEL"; //등급 //Magic string itemGrade1 = "Magic"; //카테고리 //Helm string category = "Helm"; //최소 방어력 //21 int minArmor = 21; //최대 방어력 //24 int maxArmor ..