public override void Draw() { Console.Clear(); base.DrawTitle(); DrawerOptions opt = new DrawerOptions(); opt.Top = 1; foreach (Option o in Options) { opt.Left = (Console.WindowWidth / 2) - (o.Text.Length / 2); opt.Top += 2; DrawerLine Line = new DrawerLine(); if (Options.IndexOf(o) == Index) { Line.DefaultBackgroundColor = o.Color; Line.DefaultForegroundColor = o.Back; } else { Line.DefaultForegroundColor = o.Color; Line.DefaultBackgroundColor = o.Back; } Line += o.Text; DrawerContent Content = new DrawerContent(); Content.AppendLine(Line); Drawer.Draw(Content, opt); } }
protected override void DrawTitle() { DrawerContent con = new DrawerContent(); con.AppendLine(new DrawerLine(" You got a new level of class " + State.Current.Hero.Class.Enum().ToString() + "! ", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(" ", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(" You increase your health on" + Hit + " ", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(" and increase your " + State.Current.Hero.SPName.String() + " on" + Sp + "! ", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(" ", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(" Minimal damage now equals " + Mdmg + " ", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(" and a maximum of " + MaxDmg + "! ", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(" ", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(" Now requires " + TimeManager.Steps + " steps to call a monster! ", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(" Now you can get " + State.Current.Hero.ImpPackMax.ToString() + " more improvements! ", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(" ", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(" Select the ability to improve (press button): ", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(" [1] " + State.Current.Hero.Q.Name + " ", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(" [2] " + State.Current.Hero.W.Name + " ", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(" [3] " + State.Current.Hero.E.Name + " ", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(" [4] " + State.Current.Hero.R.Name + " ", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(" ", ConsoleColor.DarkGreen)); DrawerOptions opt = new DrawerOptions(); opt.Left = 50 - con.Lines[0].Chars.Count / 2; opt.Top = 19 - con.Lines.Count / 2; Drawer.Draw(con, opt); }
private static void StatDisplay(Person Hero) { Console.Clear(); DrawerContent con = new DrawerContent(); con.AppendLine(new DrawerLine("Hero: " + Hero.HeroName.String())); con.AppendLine(new DrawerLine("Race: " + Hero.Race.Enum())); con.AppendLine(new DrawerLine("Class: " + Hero.Class.Enum())); con.AppendLine(new DrawerLine("Level: " + Hero.Level.Int().ToString())); DrawerOptions opt = new DrawerOptions(); Int32 x = 0; foreach (var line in con.Lines) { if (line.Chars.Count > x) { x = line.Chars.Count; } } opt.Left = 50 - (x / 2); opt.Top = 15 - 3; Drawer.Draw(con, opt); }
public void columnTest() { DrawerContent target = new DrawerContent(); // TODO: Initialize to an appropriate value int expected = 0; // TODO: Initialize to an appropriate value int actual; target.column = expected; actual = target.column; Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
public void DrawMini() { DrawerOptions opt = new DrawerOptions() { Left = 74, Top = 34 }; DrawerContent con = new DrawerContent(); foreach (var Line in LastMiniLines) { con.AppendLine(Line); } Drawer.Draw(con, opt); }
public override void Draw() { DrawerOptions opt = new DrawerOptions() { Left = 2, Top = 34 }; DrawerContent con = new DrawerContent(); foreach (var Line in LastLines) { con.AppendLine(Line); } Drawer.Draw(con, opt); }
protected override void DrawTitle() { DrawerContent con = new DrawerContent(); con.AppendLine(new DrawerLine("#######################################################################", ConsoleColor.DarkGreen)); for (int i = 0; i < 30; i++) { con.AppendLine(new DrawerLine("# #", ConsoleColor.DarkGreen)); } con.AppendLine(new DrawerLine("#######################################################################", ConsoleColor.DarkGreen)); DrawerOptions opt = new DrawerOptions(); opt.Left = 0; opt.Top = 0; Drawer.Draw(con, opt); }
protected virtual void DrawTitle() { DrawerOptions opt = new DrawerOptions(); opt.Left = (Console.WindowWidth / 2) - (Title.Text.Length / 2); opt.Top = 1; DrawerContent cont = new DrawerContent(); DrawerLine line = new DrawerLine(); line.DefaultForegroundColor = Title.Color; line.DefaultBackgroundColor = Title.Back; line += Title.Text; cont.AppendLine(line); Drawer.Draw(cont, opt); }
protected override void DrawTitle() { DrawerContent con = new DrawerContent(); con.AppendLine(new DrawerLine("#######################################################################", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# Dungeon 12 One Year Anniversary #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# Gameplay: #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# You have 50 steps before next enemy will be respawned #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# each your level up steps will decrease by one step #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# your mission survive to last boss at 51 level. #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# Controls: #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# F1 : This window #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# Up Arrow : Move hero at top #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# Down Arrow : Move hero to down #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# Left Arrow : Move hero to the left #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# Right Arrow : Move hero to the right #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# L : Info about near objects #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# Enter : Take/Activate object #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# A : Hit object #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# Q : Use 1 ability #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# W : Use 2 ability #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# E : Use 3 ability #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# R : Use 4 ability #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# Esc : Exit and Save #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# Good luck! #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("# #", ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine("#######################################################################", ConsoleColor.DarkGreen)); DrawerOptions opt = new DrawerOptions(); opt.Left = 50 - con.Lines[0].Chars.Count / 2; opt.Top = 19 - con.Lines.Count / 2; Drawer.Draw(con, opt); }
public DrawerContent GetColorfull() { DrawerContent Content = new DrawerContent(); for (int j = 0; j < 30; j++) { DrawerLine Line = new DrawerLine(); for (int i = 0; i < 69; i++) { DrawerChar Char = new DrawerChar(); Char.Icon = Map[i, j].Icon; Char.Color = Map[i, j].Color; Char.Back = Map[i, j].Back; Line.Add(Char); } Content.AppendLine(Line); } return Content; }
public override void Draw() { Console.Clear(); base.DrawTitle(); DrawerOptions opt = new DrawerOptions(); opt.Left = (Console.WindowWidth / 2) - (Text.Length / 2); opt.Top = (Console.WindowHeight / 2); DrawerLine Line = new DrawerLine(); Line.DefaultForegroundColor = ForegroundColor; Line.DefaultBackgroundColor = BackgroundColor; Line.Add(Text); DrawerContent con = new DrawerContent(); con.AppendLine(Line); Drawer.Draw(con, opt); }
protected override void DrawTitle() { String s = "#"; String se = "#"; for (int i = 0; i < 70; i++) { s += '#'; se += ' '; } se = se.Substring(0, se.Length - 1) + "#"; s += " ############################"; se += " # #"; DrawerContent con = new DrawerContent(); con.AppendLine(new DrawerLine(s, ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(se, ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(se, ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(se, ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(se, ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(se, ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(se, ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(se, ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(se, ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(se, ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(se, ConsoleColor.DarkGreen)); con.AppendLine(new DrawerLine(s, ConsoleColor.DarkGreen)); DrawerOptions opt = new DrawerOptions(); opt.Left = 0; opt.Top = 33; Drawer.Draw(con, opt); }
public void DrawerContentConstructorTest() { DrawerContent target = new DrawerContent(); Assert.Inconclusive("TODO: Implement code to verify target"); }
public void visibilityTest() { DrawerContent target = new DrawerContent(); // TODO: Initialize to an appropriate value Visibility expected = new Visibility(); // TODO: Initialize to an appropriate value Visibility actual; target.visibility = expected; actual = target.visibility; Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
public void headerTest() { DrawerContent target = new DrawerContent(); // TODO: Initialize to an appropriate value string expected = string.Empty; // TODO: Initialize to an appropriate value string actual; target.header = expected; actual = target.header; Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
public override void Draw() { DrawTitle(); DrawerContent Content = new DrawerContent(); Content.AppendLine(Drawer.Spaces((13) - (State.Current.Hero.HeroName.String().Length / 2)) + State.Current.Hero.HeroName.String(), ConsoleColor.Magenta); Content.AppendLine(); String S = "Race : " + State.Current.Hero.Race.Enum(); Content.AppendLine(Drawer.Spaces((13) - (S.Length / 2)) + S, ConsoleColor.DarkCyan); S = "Class : " + State.Current.Hero.Class.Enum(); Content.AppendLine(Drawer.Spaces((13) - (S.Length / 2)) + S, ConsoleColor.DarkCyan); Content.AppendLine(); S = "Level : " + State.Current.Hero.Level.Int().ToString(); Content.AppendLine(Drawer.Spaces((13) - (S.Length / 2)) + S, ConsoleColor.DarkGray); S = "EXP : " + State.Current.Hero.Cexp.Int().ToString() + "/" + State.Current.Hero.Mexp.Int().ToString(); Content.AppendLine(Drawer.Spaces((13) - (S.Length / 2)) + S, ConsoleColor.DarkGray); Content.AppendLine(); S = "HP : " + State.Current.Hero.Chp.Int().ToString() + "/" + State.Current.Hero.Mhp.Int().ToString(); Content.AppendLine(Drawer.Spaces((13) - (S.Length / 2)) + S, ConsoleColor.Red); S = State.Current.Hero.SPName.String() + " : " + State.Current.Hero.Csp.Int().ToString() + "/" + State.Current.Hero.Msp.Int().ToString(); Content.AppendLine(Drawer.Spaces((13) - (S.Length / 2)) + S, (ConsoleColor)State.Current.Hero.SPColor.Enum()); Content.AppendLine(); S = "Damage"; Content.AppendLine(Drawer.Spaces((13) - (S.Length / 2)) + S, ConsoleColor.DarkRed); S = State.Current.Hero.MinDmg.Int().ToString() + "-" + State.Current.Hero.MaxDmg.Int().ToString(); Content.AppendLine(Drawer.Spaces((13) - (S.Length / 2)) + S, ConsoleColor.DarkRed); Content.AppendLine(); S = "Attack : " + State.Current.Hero.Ad.Int().ToString(); Content.AppendLine(Drawer.Spaces((13) - (S.Length / 2)) + S, ConsoleColor.Cyan); S = "Magic : " + State.Current.Hero.Ap.Int().ToString(); Content.AppendLine(Drawer.Spaces((13) - (S.Length / 2)) + S, ConsoleColor.Magenta); Content.AppendLine(); S = "Armor : " + State.Current.Hero.Armor.Int().ToString(); Content.AppendLine(Drawer.Spaces((13) - (S.Length / 2)) + S, ConsoleColor.DarkCyan); S = "Barier : " + State.Current.Hero.Barrier.Int().ToString(); Content.AppendLine(Drawer.Spaces((13) - (S.Length / 2)) + S, ConsoleColor.DarkMagenta); Content.AppendLine(); S = "Improvement pack: "; Content.AppendLine(Drawer.Spaces((13) - (S.Length / 2)) + S, ConsoleColor.Cyan); Content.AppendLine(); S = "Available: " + (State.Current.Hero.ImpPackMax - State.Current.Hero.ImpPackCurrent).ToString(); Content.AppendLine(Drawer.Spaces((13) - (S.Length / 2)) + S, ConsoleColor.DarkCyan); S = "Current: " + State.Current.Hero.ImpPackCurrent.ToString(); Content.AppendLine(Drawer.Spaces((13) - (S.Length / 2)) + S, ConsoleColor.DarkCyan); Content.AppendLine(); Content.AppendLine(); S = "Gold : " + State.Current.Hero.Gold.Int().ToString(); Content.AppendLine(Drawer.Spaces((13) - (S.Length / 2)) + S, ConsoleColor.Yellow); Drawer.Draw(Content, new DrawerOptions() { Left = 73, Top = 1 }); }