Skip to content

Commit 81c0a78

Browse files
committed
Other: Add UI screenshot to README.
1 parent bfbfc44 commit 81c0a78

File tree

3 files changed

+41
-39
lines changed

3 files changed

+41
-39
lines changed

DTC.Core

README.md

Lines changed: 40 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
[![Twitter URL](https://img.shields.io/twitter/url/https/twitter.com/deanthecoder.svg?style=social&label=Follow%20%40deanthecoder)](https://twitter.com/deanthecoder)
22
# CodeIngest
3-
**CodeIngest** is a cross-platform C# CLI tool that recursively scans a directory of source files, filters out noise (comments, using statements, namespaces), and generates a flattened source dump designed for GPT code review or large-scale source inspection.
3+
**CodeIngest** is a cross-platform C# tool that recursively scans a directory of source files, filters out noise (comments, using statements, namespaces), and generates a flattened source dump designed for GPT code review or large-scale source inspection.
4+
![CodeIngest Screenshot](img/app.png)
45

56
## Features
67
- Cross-platform (.NET)
8+
- Command-line and UI variants.
79
- Strips comments, `using` directives, and `namespace` blocks
810
- Outputs a single readable output file with the following features:
9-
- File headers
10-
- Line numbers
11-
- Cleaned source code
11+
-File headers
12+
-Line numbers
13+
-Cleaned source code
1214
- Skips generated and irrelevant files (e.g. `.designer.cs`, `bin`, `obj`, `.resx`, etc.)
1315

14-
## Usage
16+
## Command Line Usage
1517
```
1618
CodeIngest <directory> [<directory> ...] [*.ext1;*.ext2] <output.code>
1719
```
@@ -25,61 +27,61 @@ CodeIngest *.cs;*.cpp SourceDump.code
2527

2628
## Example Output
2729
```csharp
28-
// CodeIngest Source Dump - A CLI tool that merges and processes code files for GPT reviews.
30+
// CodeIngest Source Dump-A CLI tool that merges and processes code files for GPT reviews.
2931
// Notes: Some code content may have been removed.
3032
// File: GameState.cs
31-
20|public class GameState : IAiGameState
33+
20|public class GameState:IAiGameState
3234
21|{
3335
22|private readonly Vector2[] m_bats;
3436
23|private readonly Vector2 m_ballPosition;
3537
24|private readonly Vector2 m_ballVelocity;
3638
25|private readonly int m_arenaWidth;
3739
26|private readonly int m_arenaHeight;
38-
28|public GameState(Vector2[] bats, Vector2 ballPosition, Vector2 ballVelocity, int arenaWidth, int arenaHeight)
40+
28|public GameState(Vector2[] bats,Vector2 ballPosition,Vector2 ballVelocity,int arenaWidth,int arenaHeight)
3941
29|{
40-
30|m_bats = bats;
41-
31|m_ballPosition = ballPosition;
42-
32|m_ballVelocity = ballVelocity;
43-
33|m_arenaWidth = arenaWidth;
44-
34|m_arenaHeight = arenaHeight;
42+
30|m_bats=bats;
43+
31|m_ballPosition=ballPosition;
44+
32|m_ballVelocity=ballVelocity;
45+
33|m_arenaWidth=arenaWidth;
46+
34|m_arenaHeight=arenaHeight;
4547
35|}
4648
37|public double[] ToInputVector()
4749
38|{
48-
39|var inputVector = new double[Brain.BrainInputCount];
49-
42|inputVector[0] = m_bats[0].Y / m_arenaHeight * 2.0f - 1.0f;
50-
43|inputVector[1] = m_bats[1].Y / m_arenaHeight * 2.0f - 1.0f;
51-
45|inputVector[2] = (m_bats[0].Y - m_ballPosition.Y) / m_arenaHeight * 2.0f;
52-
46|inputVector[3] = (m_bats[1].Y - m_ballPosition.Y) / m_arenaHeight * 2.0f;
53-
49|inputVector[4] = m_ballPosition.X / m_arenaWidth * 2.0f - 1.0f;
54-
50|inputVector[5] = m_ballPosition.Y / m_arenaHeight * 2.0f - 1.0f;
55-
51|inputVector[6] = m_ballVelocity.X.Clamp(-1.0f, 1.0f);
56-
52|inputVector[7] = m_ballVelocity.Y.Clamp(-1.0f, 1.0f);
50+
39|var inputVector=new double[Brain.BrainInputCount];
51+
42|inputVector[0]=m_bats[0].Y/m_arenaHeight*2.0f-1.0f;
52+
43|inputVector[1]=m_bats[1].Y/m_arenaHeight*2.0f-1.0f;
53+
45|inputVector[2]=(m_bats[0].Y-m_ballPosition.Y)/m_arenaHeight*2.0f;
54+
46|inputVector[3]=(m_bats[1].Y-m_ballPosition.Y)/m_arenaHeight*2.0f;
55+
49|inputVector[4]=m_ballPosition.X/m_arenaWidth*2.0f-1.0f;
56+
50|inputVector[5]=m_ballPosition.Y/m_arenaHeight*2.0f-1.0f;
57+
51|inputVector[6]=m_ballVelocity.X.Clamp(-1.0f,1.0f);
58+
52|inputVector[7]=m_ballVelocity.Y.Clamp(-1.0f,1.0f);
5759
54|return inputVector;
5860
55|}
5961
56|}
6062
// File: Brain.cs
61-
18|public class Brain : AiBrainBase
63+
18|public class Brain:AiBrainBase
6264
19|{
63-
20|public const int BrainInputCount = 8;
64-
22|public Brain() : base(BrainInputCount, [16], 4)
65+
20|public const int BrainInputCount=8;
66+
22|public Brain():base(BrainInputCount,[16],4)
6567
23|{
6668
24|}
67-
26|private Brain(Brain brain) : base(brain)
69+
26|private Brain(Brain brain):base(brain)
6870
27|{
6971
28|}
70-
29|public (Direction LeftBat, Direction RightBat) ChooseMoves(IAiGameState state)
72+
29|public (Direction LeftBat,Direction RightBat) ChooseMoves(IAiGameState state)
7173
30|{
72-
31|var outputs = GetOutputs(state);
73-
33|var leftBatDirection = Direction.Left;
74-
34|var diff = outputs[0] - outputs[1];
75-
35|if (Math.Abs(diff) > 0.2)
76-
36|leftBatDirection = diff > 0 ? Direction.Up : Direction.Down;
77-
38|var rightBatDirection = Direction.Left;
78-
39|diff = outputs[2] - outputs[3];
79-
40|if (Math.Abs(diff) > 0.2)
80-
41|rightBatDirection = diff > 0 ? Direction.Up : Direction.Down;
81-
43|return (leftBatDirection, rightBatDirection);
74+
31|var outputs=GetOutputs(state);
75+
33|var leftBatDirection=Direction.Left;
76+
34|var diff=outputs[0]-outputs[1];
77+
35|if (Math.Abs(diff)>0.2)
78+
36|leftBatDirection=diff>0?Direction.Up:Direction.Down;
79+
38|var rightBatDirection=Direction.Left;
80+
39|diff=outputs[2]-outputs[3];
81+
40|if (Math.Abs(diff)>0.2)
82+
41|rightBatDirection=diff>0?Direction.Up:Direction.Down;
83+
43|return (leftBatDirection,rightBatDirection);
8284
44|}
83-
46|public override AiBrainBase Clone() => new Brain(this);
85+
46|public override AiBrainBase Clone()=>new Brain(this);
8486
47|}
8587
```

img/app.png

370 KB
Loading

0 commit comments

Comments
 (0)