Click here to Skip to main content
15,513,571 members
Home / Discussions / C#
   

C#

 
GeneralRe: reading memory stream in byte chunks Pin
harold aptroot10-Sep-22 11:15
harold aptroot10-Sep-22 11:15 
QuestionC# Service: Error 1053: The service did not respond to the start or control request in a timely fashion Pin
temuco8-Sep-22 21:41
professionaltemuco8-Sep-22 21: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 22:49
mveRichard Deeming8-Sep-22 22: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 23:34
professionaltemuco8-Sep-22 23: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 2:38
professionaltemuco9-Sep-22 2:38 
QuestionC# Battleship gameboard & random assignment Pin
Otto_W5-Sep-22 18:50
Otto_W5-Sep-22 18:50 
AnswerRe: C# Battleship gameboard & random assignment Pin
OriginalGriff5-Sep-22 20:11
mveOriginalGriff5-Sep-22 20:11 
GeneralRe: C# Battleship gameboard & random assignment Pin
Otto_W6-Sep-22 16:51
Otto_W6-Sep-22 16: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 20:19
mveOriginalGriff6-Sep-22 20:19 
GeneralRe: C# Battleship gameboard & random assignment Pin
Otto_W16-Sep-22 22:54
Otto_W16-Sep-22 22:54 
GeneralRe: C# Battleship gameboard & random assignment Pin
OriginalGriff16-Sep-22 23:13
mveOriginalGriff16-Sep-22 23:13 
GeneralRe: C# Battleship gameboard & random assignment Pin
Otto_W24-Sep-22 2:09
Otto_W24-Sep-22 2:09 
GeneralRe: C# Battleship gameboard & random assignment Pin
OriginalGriff24-Sep-22 2:34
mveOriginalGriff24-Sep-22 2:34 
GeneralRe: C# Battleship gameboard & random assignment Pin
Otto_W24-Sep-22 3:45
Otto_W24-Sep-22 3:45 
GeneralRe: C# Battleship gameboard & random assignment Pin
OriginalGriff24-Sep-22 4:16
mveOriginalGriff24-Sep-22 4:16 
GeneralRe: C# Battleship gameboard & random assignment Pin
Otto_W25-Sep-22 22:20
Otto_W25-Sep-22 22:20 
GeneralRe: C# Battleship gameboard & random assignment Pin
OriginalGriff25-Sep-22 23:01
mveOriginalGriff25-Sep-22 23:01 
GeneralRe: C# Battleship gameboard & random assignment Pin
Otto_W29-Sep-22 17:23
Otto_W29-Sep-22 17:23 
GeneralRe: C# Battleship gameboard & random assignment Pin
OriginalGriff29-Sep-22 20:10
mveOriginalGriff29-Sep-22 20:10 
GeneralRe: C# Battleship gameboard & random assignment Pin
Otto_W4-Oct-22 1:29
Otto_W4-Oct-22 1:29 
GeneralRe: C# Battleship gameboard & random assignment Pin
OriginalGriff4-Oct-22 2:09
mveOriginalGriff4-Oct-22 2:09 
GeneralRe: C# Battleship gameboard & random assignment Pin
Otto_W13-Oct-22 18:45
Otto_W13-Oct-22 18:45 
GeneralRe: C# Battleship gameboard & random assignment Pin
Otto_W13-Oct-22 18:46
Otto_W13-Oct-22 18:46 
GeneralRe: C# Battleship gameboard & random assignment Pin
Otto_W25-Oct-22 18:16
Otto_W25-Oct-22 18:16 
GeneralRe: C# Battleship gameboard & random assignment Pin
OriginalGriff25-Oct-22 20:34
mveOriginalGriff25-Oct-22 20: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.