Questions tagged [console]
Use this tag for programs that interact with their user by means of a character-based console or terminal
834
questions
2
votes
0
answers
28
views
Tic Tac Toe CLI in Clojure
I wrote a command line tic tac toe game in Clojure. I've broken this post into three sections: Feedback Requests, Gameplay, and Code
Feedback Requests
I'm looking for feedback on:
How "idiomatic&...
3
votes
2
answers
104
views
Get Terminal Size, Enable and Disable Terminal Raw Mode without NCURSES
I searched around and found these 7 ways to determine the width and height of the terminal:
...
8
votes
1
answer
501
views
Battleship vs. computer with Python
I am still pretty new to Python. After spending time on Code Wars and copying a handful of projects from Al Sweigart's Big Book of Small Python Projects, I wanted to build something completely from ...
4
votes
2
answers
286
views
Simple size difference measuring tool
Simple tool I wrote in an hour or two (I'm not very fast, but I eventually get there - also for the "spending 6 hours to save 6 seconds" meme).
Would've written this in shellscript given ...
5
votes
1
answer
194
views
Parsing command-line arguments with getopt in C++
I did not find anything to parse command-line arguments in C++ (which was surprising), so I fell back to getopt() which has served me well in C (I am currently not ...
10
votes
2
answers
242
views
A simple ray marcher for the command line
This is my attempt at creating a ray marcher for the command line for fun.
I have some prior experience with C programming, although I'm far from being an expert, and little to no experience with ...
4
votes
1
answer
93
views
rock paper scissors game in console
I've made a simple rock paper scissors game using javascript. Any feedback appreciated. This is a first project I've done with almost no help
...
3
votes
1
answer
73
views
Display summary statistics about Discord messages
This is just a program that displays summary statistics about discord messages sent to a certain user using a Discord data package. The CSV of messages to a user is ...
5
votes
2
answers
242
views
Simple Java Command-line Checkers Game
I was working on a checkers game for a college project.
After I did a sprint to finish it, I want to improve the movement logic.
Right now, it is housed within the ...
18
votes
3
answers
3k
views
A tic-tac-toe game in C
I am (trying) to learn the C programming language for fun with my father's book "The C Programming Language". I tried writing a tic-tac-toe game in C. I have no professional experience, so ...
2
votes
1
answer
61
views
Text-based tic-tac-toe in bash (continued)
I wrote this two-player tic-tac-toe program in bash. To make a move, you enter a number between 1 and 9 which corresponds to the square:
...
1
vote
1
answer
93
views
Linux terminal like parsing
I'm creating a program that will hopefully operate like linux terminal (basic commands) for learning purposes.
...
6
votes
1
answer
176
views
Text based tic-tac-toe in bash
I wrote this two player tic-tac-toe program in bash. To make a move you enter a number between 0 and 8 which corresponds to the square:
0|1|2
3|4|5
6|7|8
This is ...
4
votes
1
answer
79
views
Terminal based game: Part 3 (Using templated game)
Working from previous posts
In this post: Terminal based game: Part 2 I introduced the concept of a Game object. To build a game like Terminal Base Snake you could ...
4
votes
1
answer
76
views
Terminal Base Snake
Based on this Framework
Terminal based game: Part 2
A game that uses std::cout to print the board and std::cin to get keyboard ...
4
votes
1
answer
91
views
Terminal based game: Part 2
Follow up to: Terminal based game
Finished up the framework.
Still sticking with the X-Term based version.
As I want a very simple framework to use for teaching (not this part initially).
But my next ...
6
votes
2
answers
2k
views
Terminal based game
Looking to build a terminal based game.
I am assuming X-Term like terminal.
This means:
I can use the X-Term control codes to clear and move around the screen.
I can use ...
5
votes
3
answers
710
views
Rust: Command line menu in ASCII table
Specific areas in which I'd love to get feedback:
Is it good to have the Command struct own the Strings (...
0
votes
0
answers
84
views
Check all files in two folders with partial match in name and update one of the folders with the newest from both
Here is the code I am using it works fine; however, it obviously takes forever when there are a lot of files to check.
exact shell is cmd.exe.
I am really just looking to make it more efficient.
Here ...
0
votes
1
answer
38
views
What command line options style is the best for command similar to `scp`? [closed]
I am writing a command line tool to copy files to or from locations, which can be a path inside a task inside a running Nomad task. The location can be either a stream or location on the local ...
0
votes
1
answer
75
views
Reassure user that python code is running during long imports
I have created a large module for downloading data from SAP and editing and displaying it on a plotly dashboard. While the code is running as desired there is one problem that bugs me:
The submodules ...
7
votes
4
answers
2k
views
C# console app that draws an image to the console using ASCII
I'm semi-new to programming and want to improve my skills by understanding how people might optimize their code and how the code should be structured since I've been told it needs to do more than just ...
3
votes
2
answers
116
views
Text based Java game "Battle Arena"
This is my first java program. I'm coming from a python background. This is a text based combat arena game.
Are there any ways I could better implement the overall code structure?
How might I improve ...
1
vote
1
answer
38
views
Python3 Unix command_line_interface task organizer application using argparse
Greetings.
Lately I've tried to use a branch of text_formatting rules to enhance my productivity while working with different integration tools such as Git, but this formatting convention went so
...
4
votes
1
answer
100
views
Parametric - a simple program argument parser
I've made a little header-only library for handling user input for console applications, I'd really appreciate it if you guys took a short look at it and told me what you think. The goal of the ...
12
votes
2
answers
2k
views
Conway's Game of Life Terminal Visualization in C
I'm currently learning C, and decided to practice what I've been working on with a project, namely implementing Conway's Game of Life as a terminal visualization. This is my first project in C.
The ...
1
vote
1
answer
97
views
Sports league creation script
I'm building a little game that lets you generate a random sports league with random teams and random rosters. What are some ways that I can improve the readability and performance for this code?
Main ...
1
vote
2
answers
484
views
Best Practices For A Console Menu App
I am quite fresh to c# and creating programs. I wrote a very basic program which allows you to go through menu selections via up and down arrowkeys and select your selection along with sending you to ...
1
vote
2
answers
403
views
Thread-safe int wrapper in c#
My system is a .NET Core 7 console app, which starts some background threads. I need to pass some int values (counters, etc.) between the main and background ...
8
votes
4
answers
3k
views
Recreating Minesweeper
First, I have to say that this game lacks 5 features that I don't care:
Flags
Chording
Timer
Actual mouse movement
Good graphics
When starting the program, the player is meeted with a "Choose ...
3
votes
1
answer
172
views
Yet another CLI Hangman game
...with properly packaged/type-hinted code, automated testing, and no dependencies. Do note that this package requires Python 3.12 or later.
Only pyproject.toml and ...
2
votes
1
answer
135
views
Tic-tac-toe game for Windows console
I am doing C++ for over a year and this is my game I tried making tic-tac-toe. And it's also my first program that uses multiple source files.
main.cpp
...
2
votes
1
answer
694
views
Little CLI game in C++ with random words
the game is quite simple, you have to constantly guess the letters of a hidden word, but has a limited number of wrong attempts. The word you are looking for should be a random word from Wikipedia. I ...
0
votes
1
answer
81
views
wtpdmt - Windows thread preemption duration measurement tool (C++)
I have this repository. The idea is that the user may measure for how long the thread is preempted with given priority class/thread priority.
CommandLineParser.h:
<...
4
votes
2
answers
224
views
A Python terminal
This is the code for Pylect, a Python terminal I worked on a while ago which also caused my Desktop to get destroyed because of bad code. I use it infrequently but I would like a review for the code ...
0
votes
1
answer
178
views
Calling the base method from overriden method to add some functionality
I have a small Linked list program which I created for just brushing up the concepts.
Following is my Node class
...
2
votes
1
answer
515
views
A very basic calculator in C#
I'm trying to learn C#, I made this calculator with my current knowledge. It works as I intended, but I'd appreciate some input on my code.
...
3
votes
1
answer
138
views
Highly flexible tic-tac-toe terminal game in python
I have created a two-file tic-tac-toe game, with board.py containing most of the internal workings of the playing board. I intended to have ...
1
vote
1
answer
75
views
Javascript CLI to boot iOS simulators, install project, extract data, and merge into JSON
I'm a DIY "dev" - so I really create things that I need or think they'll end up helping others.
I wrote this Swift Package so the iOS community could get device bezel radius' to help with UI ...
11
votes
2
answers
2k
views
CAT: Cat Approved TUIs
Cat
Hello everyone! I am working on this TUI framework which aims to abstract the ncurses library. I was wondering how understandable it is, and what I can improve! Any feedback is welcome!!
My ...
6
votes
2
answers
204
views
Simple vocabulary trainer based on flashcards
Motivation
When I was young, I had to learn english in school and I was really bad. My father told me to write words on little cards, with a word on the one side and its foreign counterpart on the ...
2
votes
1
answer
87
views
TicTacToe OOP approach in Kotlin
I wrote a terminal-based TicTacToe game in Kotlin to practice both Kotlin and OOP. Any feedback on structure and code would be appreciated.
Board.kt
...
4
votes
0
answers
73
views
Manage have-read and want-to-read books and series
I am building this program to keep track of the books I have read and the series I want to read, and I would like help on improving the user interface.
...
1
vote
1
answer
141
views
The simple calculator in Ruby
I wrote the simple calculator in Ruby. This is my first program in this language. I've switched recently from Python to Ruby. What do you think about my work? Thanks
...
2
votes
1
answer
177
views
Command-line parser with built-in error checking
Simple command-line option parser with automatic setting of variables and built-in error checking.
The story is I was working on another new project that had a lot of configurable options, as they ...
2
votes
1
answer
569
views
Model-View-Presenter (MVP) pattern implementation
To learn more about design patterns, particularly the Model-View-Presenter (MVP) pattern, I am currently creating a CLI weight tracker application in Python. I would like you to review the code to ...
1
vote
0
answers
118
views
Python CLI tool - automatic mapping from models to parameters with Click
I was working on a small python CLI tool using the Click library for the first time and realized I was defining parameters and mappings from them to objects/classes in multiple places and anytime I ...
6
votes
2
answers
553
views
A simple CLI arbitrary-precision Mandelbrot set calculator (for a single point)
I wrote the following C code that takes a couple of arguments on the command line and calculates a given number of iterations of the Mandelbrot set complex mapping using MPFR arbitrary precision ...
3
votes
1
answer
203
views
Implementing Model-View-Presenter in a console program [closed]
I'm designing a board game with my wife, and am writing a console based program that can track and analyze the statistics of playtests to see if the game is balanced, what the dominant strategies are, ...
4
votes
1
answer
107
views
Basic CLI BlackJack Game in Java
I am looking to see which aspects of this code could use improvement.
In both design, and basic implementation and coding.
I'm using IntelliJ and Java SE 20.
...