Click here to Skip to main content
15,881,380 members
Home / Discussions / C#
   

C#

 
GeneralRe: reading memory stream in byte chunks Pin
harold aptroot10-Sep-22 10:15
harold aptroot10-Sep-22 10:15 
QuestionC# Service: Error 1053: The service did not respond to the start or control request in a timely fashion Pin
temuco8-Sep-22 20:41
professionaltemuco8-Sep-22 20:41 
AnswerRe: C# Service: Error 1053: The service did not respond to the start or control request in a timely fashion Pin
Richard Deeming8-Sep-22 21:49
mveRichard Deeming8-Sep-22 21:49 
GeneralRe: C# Service: Error 1053: The service did not respond to the start or control request in a timely fashion Pin
temuco8-Sep-22 22:34
professionaltemuco8-Sep-22 22:34 
General[Solved] Re: C# Service: Error 1053: The service did not respond to the start or control request in a timely fashion Pin
temuco9-Sep-22 1:38
professionaltemuco9-Sep-22 1:38 
QuestionC# Battleship gameboard & random assignment Pin
Otto_W5-Sep-22 17:50
Otto_W5-Sep-22 17:50 
AnswerRe: C# Battleship gameboard & random assignment Pin
OriginalGriff5-Sep-22 19:11
mveOriginalGriff5-Sep-22 19:11 
GeneralRe: C# Battleship gameboard & random assignment Pin
Otto_W6-Sep-22 15:51
Otto_W6-Sep-22 15:51 
Thanks Griff for taking the time to read my post and provide meaningful feedback.

Haha I will opt for the nutcracker instead of the sledgehammer moving forward.

I was experimenting with the DataTable class due to the appeal of Rows/Columns in
a table, but that's not the best approach as you've laid out. I follow what you are
saying with the 10x10 area of squares that have the four possible enum values.

Then calling the Square to create the array for the game board. Using the if/else logic to Referencing the specific squares. Next creating the nested x,y for loops to clear the board, and then being able to start the new game by calling an instance of the Square[10,10] grid for each
player.

I follow you on creating a method to load the ships into, and at first trying single space ships(get that working ) before moving onto more complex logic with the ship lengths.

I'll have to do a deeper dive on encapsulating the Square array in a Board class, then a base Ship
class within to create the ships, but this seems like the best approach to implement.

Yeah I haven't had much practice with classes and instances up to this point, but have a surface
level understanding of them.

I am mostly just repeating back to you what you've told me in this post, but it's extremely
helpful for my understanding and guiding me along the way.

Thanks again Griff!
GeneralRe: C# Battleship gameboard & random assignment Pin
OriginalGriff6-Sep-22 19:19
mveOriginalGriff6-Sep-22 19:19 
GeneralRe: C# Battleship gameboard & random assignment Pin
Otto_W16-Sep-22 21:54
Otto_W16-Sep-22 21:54 
GeneralRe: C# Battleship gameboard & random assignment Pin
OriginalGriff16-Sep-22 22:13
mveOriginalGriff16-Sep-22 22:13 
GeneralRe: C# Battleship gameboard & random assignment Pin
Otto_W24-Sep-22 1:09
Otto_W24-Sep-22 1:09 
GeneralRe: C# Battleship gameboard & random assignment Pin
OriginalGriff24-Sep-22 1:34
mveOriginalGriff24-Sep-22 1:34 
GeneralRe: C# Battleship gameboard & random assignment Pin
Otto_W24-Sep-22 2:45
Otto_W24-Sep-22 2:45 
GeneralRe: C# Battleship gameboard & random assignment Pin
OriginalGriff24-Sep-22 3:16
mveOriginalGriff24-Sep-22 3:16 
GeneralRe: C# Battleship gameboard & random assignment Pin
Otto_W25-Sep-22 21:20
Otto_W25-Sep-22 21:20 
GeneralRe: C# Battleship gameboard & random assignment Pin
OriginalGriff25-Sep-22 22:01
mveOriginalGriff25-Sep-22 22:01 
GeneralRe: C# Battleship gameboard & random assignment Pin
Otto_W29-Sep-22 16:23
Otto_W29-Sep-22 16:23 
GeneralRe: C# Battleship gameboard & random assignment Pin
OriginalGriff29-Sep-22 19:10
mveOriginalGriff29-Sep-22 19:10 
GeneralRe: C# Battleship gameboard & random assignment Pin
Otto_W4-Oct-22 0:29
Otto_W4-Oct-22 0:29 
GeneralRe: C# Battleship gameboard & random assignment Pin
OriginalGriff4-Oct-22 1:09
mveOriginalGriff4-Oct-22 1:09 
GeneralRe: C# Battleship gameboard & random assignment Pin
Otto_W13-Oct-22 17:45
Otto_W13-Oct-22 17:45 
GeneralRe: C# Battleship gameboard & random assignment Pin
Otto_W13-Oct-22 17:46
Otto_W13-Oct-22 17:46 
GeneralRe: C# Battleship gameboard & random assignment Pin
Otto_W25-Oct-22 17:16
Otto_W25-Oct-22 17:16 
GeneralRe: C# Battleship gameboard & random assignment Pin
OriginalGriff25-Oct-22 19:34
mveOriginalGriff25-Oct-22 19:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.