BS in Computer Science certified as a 2nd level Addiction Counselor (CADC II) in Oregon certified as a Qualified Professional in Mental Health and Addiction in North Carolina
You can find my CV Resume here at Linked In www
Hello Intrepid Explorer
Welcome to my C# (C Sharp) Console App. (Application) You might not believe it, but this app has no web stuff, gasp. Seriously, only ASCII characters. When I was growing up there was no handy mouse by the computers. Only the keyboard. There were no pictures on the screen. Some creative people (bored? :-) would make an image shown / drawn by only using the characters and numbers on the keyboard. Here is an e.g. of a drawn "Hi" then converted to ASCII characters.
.lc.
.:OO:. .:;
.c0k; ;OO:
.o0k;. .lKx.
.oOk: ,k0c
.o0k, .lKk'
;KO. .cXd. .,.
lXl ,dKO. cKWNx.
.OO. .xWX: .OMMMX;
dX; .dK0c 'lxKd.
.k0' lXl. ..
cXo '0k. .'.
.OO' cNl .dK:
.dNO:;;;;,.,kX; 'kKl.
.lXNOxxxxxkkON0' '00;
'0k. .cXx. .xX:
cNl dX: lXo
.k0' '0k. cKd.
lXo cNl cKd.
,0O. .xX; ;Xk.
.dX: :Xx. dX:
;Kx. dX: ;Kx.
;0O' dX; .dX:
'xKd. cXd. oX: .,ll.
;o, lKk, '0Kocldkkxd;.
'c, .:lll:'.
The Battleship App is run from the Command Line Interface (CLI) or the .EXE can be double clicked from your mouse. See instructions below to compile / build your executable to run.
Directory: C:\Users\...\source\repos\John Console App Battleship\John Console App Battleship\bin\debug\net6.0
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 4/15/2022 6:28 AM 473 John Console App Battleship.deps.json
-a---- 4/20/2022 2:05 PM 21504 John Console App Battleship.dll
-a---- 4/20/2022 2:05 PM 148992 John Console App Battleship.exe
-a---- 4/20/2022 2:05 PM 18084 John Console App Battleship.pdb
-a---- 4/15/2022 6:28 AM 147 John Console App Battleship.runtimeconfig.json
cd C:\Users\...\source\repos\John Console App Battleship\John Console App Battleship\bin\debug\net6.0
or for Release / Production build go to
cd C:\Users\...\source\repos\John Console App Battleship\John Console App Battleship\bin\Release\net6.0
If you are in a Windows File manager then double click on John Console App Battleship.exe
If you are in your Command Line Interface (CLI) type in John Console App Battleship.exe
and press Enter key (return key)
For PowerShell CLI see next section...
'Found on https://www.delftstack.com/howto/powershell/running-executable-files-in-powershell/'
Start-Process -wait -FilePath '.\John Console App Battleship.exe'
or
The website said if you want "quiet mode" use this set of arguments '/s /v /qn'
'Start-Process -wait -FilePath '.\John Console App Battleship.exe' -ArgumentList '/s /v/qn' -PassThru'
PS C:\..\source\repos\John Console App Battleship\John Console App Battleship\bin\Debug\net6.0> Start-Process -wait -FilePath '.\John Console App Battleship.exe'
PS C:\..\source\repos\John Console App Battleship\John Console App Battleship\bin\Debug\net6.0> dir
(use "git add <file>..." to include in what will be committed)
.vscode/
Directory: C:\..\source\repos\John Console App Battleship\John Console App Battleship\bin\Debug\net6.0
John Console App Battleship/classes/
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 3/23/2022 7:57 PM 473 John Console App Battleship.deps.json
-a---- 4/1/2022 4:27 PM 8704 John Console App Battleship.dll
-a---- 4/1/2022 4:27 PM 148992 John Console App Battleship.exe
-a---- 4/1/2022 4:27 PM 11916 John Console App Battleship.pdb
-a---- 3/23/2022 7:57 PM 147 John Console App Battleship.runtimeconfig.json
namespace BattleShip
{
PS C:\..\source\repos\John Console App Battleship\John Console App Battleship\bin\Debug\net6.0> Start-Process -wait -FilePath '.\John Console App Battleship.exe' -ArgumentList '/s /v/qn' -PassThru
-
Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName
------- ------ ----- ----- ------ -- -- -----------
18 4 432 1984 0.02 28004 2 John Console App Battleship
class Program
{
Learning a LOT of the basics of C##
https://aka.ms/new-console-template
Checking for null from ReadLine
https://www.tutlane.com/tutorial/csharp/csharp-switch-case-statement-with-examples
https://www.csharp-examples.net/switch/
https://www.delftstack.com/howto/csharp/multiple-case-switch-in-csharp/
https://www.educba.com/2d-arrays-in-c-sharp/
https://www.programmersranch.com/2013/05/c-ascii-art-game-part-1.html
For PowerShell checking if PowerShell (or script) is currently running with "Administor" privileges: (New-Object System.Security.Principal.WindowsPrincipal([System.Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)