-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #577 from joecare99/master
sync
- Loading branch information
Showing
109 changed files
with
5,572 additions
and
315 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// *********************************************************************** | ||
// Assembly : ConsoleDisplay | ||
// Author : Mir | ||
// Created : 08-19-2022 | ||
// | ||
// Last Modified By : Mir | ||
// Last Modified On : 08-27-2022 | ||
// *********************************************************************** | ||
// <copyright file="TileDisplay.cs" company="ConsoleDisplay"> | ||
// Copyright (c) JC-Soft. All rights reserved. | ||
// </copyright> | ||
// <summary></summary> | ||
// *********************************************************************** | ||
using System; | ||
using System.Drawing; | ||
|
||
namespace ConsoleDisplay.View | ||
{ | ||
public interface ITileDef | ||
{ | ||
Size TileSize { get; } | ||
|
||
(string[] lines, (ConsoleColor fgr, ConsoleColor bgr)[] colors) GetTileDef(Enum? tile); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// *********************************************************************** | ||
// Assembly : ConsoleDisplay | ||
// Author : Mir | ||
// Created : 07-16-2022 | ||
// | ||
// Last Modified By : Mir | ||
// Last Modified On : 07-24-2022 | ||
// *********************************************************************** | ||
// <copyright file="MyConsoleBase.cs" company="ConsoleDisplay"> | ||
// Copyright (c) JC-Soft. All rights reserved. | ||
// </copyright> | ||
// <summary></summary> | ||
// *********************************************************************** | ||
using System; | ||
|
||
namespace ConsoleDisplay.View | ||
{ | ||
public interface IConsole | ||
{ | ||
ConsoleColor ForegroundColor { get; set; } | ||
ConsoleColor BackgroundColor { get; set; } | ||
bool IsOutputRedirected { get; } | ||
bool KeyAvailable { get; } | ||
int LargestWindowHeight { get; } | ||
string Title { get; set; } | ||
int WindowHeight { get; set; } | ||
int WindowWidth { get; set; } | ||
|
||
void Beep(int freq, int len); | ||
void Clear(); | ||
(int Left, int Top) GetCursorPosition(); | ||
ConsoleKeyInfo? ReadKey(); | ||
string ReadLine(); | ||
void SetCursorPosition(int left, int top); | ||
void Write(char ch); | ||
void Write(string? st); | ||
void WriteLine(string? st = ""); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
CSharpBible/ConsoleDisplay/View/Interfaces/ITileDisplay.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// *********************************************************************** | ||
// Assembly : ConsoleDisplay | ||
// Author : Mir | ||
// Created : 08-19-2022 | ||
// | ||
// Last Modified By : Mir | ||
// Last Modified On : 08-27-2022 | ||
// *********************************************************************** | ||
// <copyright file="TileDisplay.cs" company="ConsoleDisplay"> | ||
// Copyright (c) JC-Soft. All rights reserved. | ||
// </copyright> | ||
// <summary></summary> | ||
// *********************************************************************** | ||
using System; | ||
using System.Drawing; | ||
|
||
namespace ConsoleDisplay.View | ||
{ | ||
public interface ITileDisplay<T> | ||
{ | ||
T? this[Point Idx] { get; set; } | ||
|
||
Point Position { get; } | ||
Size DispSize { get; } | ||
Size TileSize { get; } | ||
IConsole console { get; } | ||
Point DispOffset { get; set; } | ||
Func<Point, T>? FncGetTile { get; set; } | ||
Func<Point, Point>? FncOldPos { get; set; } | ||
|
||
void FullRedraw(); | ||
void SetDispSize(Size size); | ||
void Update(bool e); | ||
void WriteTile(PointF p, T tile); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace CsEpiphany.Model | ||
{ | ||
public enum Direction | ||
{ | ||
UP, | ||
DOWN, | ||
RIGHT, | ||
LEFT | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using BaseLib.Interfaces; | ||
using System; | ||
|
||
namespace BaseLib.Helper; | ||
|
||
public class CRandom :IRandom | ||
{ | ||
private Random _random; | ||
|
||
public CRandom() | ||
{ | ||
_random = new Random(); | ||
} | ||
|
||
public int Next(int v1, int v2) => v2 !=-1 || v1<v2? _random.Next(v1, v2): _random.Next(v1); | ||
|
||
public double NextDouble() => _random.NextDouble(); | ||
|
||
public int NextInt() => _random.Next(); | ||
|
||
public void Seed(int value) => _random = new Random(value); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using BaseLib.Interfaces; | ||
using System; | ||
|
||
namespace BaseLib.Helper; | ||
|
||
public class SysTime : ISysTime | ||
{ | ||
public static Func<DateTime> GetNow {get; set;} = () => DateTime.Now; | ||
public DateTime Now => GetNow(); | ||
public DateTime Today => GetNow().Date; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace BaseLib.Interfaces; | ||
|
||
public interface IHasValue | ||
{ | ||
object? Value { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System; | ||
|
||
namespace BaseLib.Interfaces; | ||
|
||
public interface ILog | ||
{ | ||
public void Log(string message); | ||
|
||
public void Log(string message, Exception exception); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
CSharpBible/Games/Game_Base/Model/Interfaces/IPlayfield2D.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// *********************************************************************** | ||
// Assembly : Snake_Base | ||
// Author : Mir | ||
// Created : 08-24-2022 | ||
// | ||
// Last Modified By : Mir | ||
// Last Modified On : 09-09-2022 | ||
// *********************************************************************** | ||
// <copyright file="Playfield2D.cs" company="JC-Soft"> | ||
// Copyright (c) JC-Soft. All rights reserved. | ||
// </copyright> | ||
// <summary></summary> | ||
// *********************************************************************** | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Drawing; | ||
|
||
namespace Game_Base.Model; | ||
|
||
public interface IPlayfield2D<T> where T : class | ||
{ | ||
T? this[Point p] { get;set; } | ||
|
||
Size PfSize { get; set; } | ||
Rectangle Rect { get; } | ||
IEnumerable<T> Items { get; } | ||
|
||
event EventHandler<(string prop, object? oldVal, object? newVal)>? OnDataChanged; | ||
|
||
bool IsInside(Point P); | ||
} |
Oops, something went wrong.