Click here to Skip to main content
15,895,011 members
Home / Discussions / C#
   

C#

 
GeneralRe: Storm8 AutoHealer Pin
OriginalGriff11-Jan-15 21:50
mveOriginalGriff11-Jan-15 21:50 
GeneralRe: Storm8 AutoHealer Pin
Dave Kreskowiak12-Jan-15 4:23
mveDave Kreskowiak12-Jan-15 4:23 
AnswerRe: Storm8 AutoHealer Pin
Pete O'Hanlon11-Jan-15 21:31
mvePete O'Hanlon11-Jan-15 21:31 
QuestionMoving objects around 2D array in threads Pin
Member 1136734811-Jan-15 10:17
Member 1136734811-Jan-15 10:17 
AnswerRe: Moving objects around 2D array in threads Pin
Richard Andrew x6411-Jan-15 12:23
professionalRichard Andrew x6411-Jan-15 12:23 
GeneralRe: Moving objects around 2D array in threads Pin
Member 1136734811-Jan-15 14:57
Member 1136734811-Jan-15 14:57 
GeneralRe: Moving objects around 2D array in threads Pin
SledgeHammer0111-Jan-15 15:04
SledgeHammer0111-Jan-15 15:04 
GeneralRe: Moving objects around 2D array in threads Pin
Member 1136734811-Jan-15 17:50
Member 1136734811-Jan-15 17:50 
Hi SledgeHammer, thanks for the advice. I will create a log file and see if I can't figure it out.

Yes the grid is being shared among all the threads. Each animal gets passed the grid (well actually the whole Field class) and makes its move by updating the grid. I use the "lock" keyword to prevent two or more threads from trying to update the grid at the same time. Everything works well aside from the reproducing of the animals. I can't get the newborns to start moving around. Can you please explain how else I can go about synchronizing things better?

Thanks.
AnswerRe: Moving objects around 2D array in threads Pin
Member 1136734813-Jan-15 11:02
Member 1136734813-Jan-15 11:02 
Questionhow about this book? Pin
kidult10-Jan-15 22:52
kidult10-Jan-15 22:52 
AnswerRe: how about this book? Pin
OriginalGriff10-Jan-15 22:59
mveOriginalGriff10-Jan-15 22:59 
GeneralRe: how about this book? Pin
kidult11-Jan-15 0:42
kidult11-Jan-15 0:42 
GeneralRe: how about this book? Pin
OriginalGriff11-Jan-15 0:46
mveOriginalGriff11-Jan-15 0:46 
GeneralRe: how about this book? Pin
kidult11-Jan-15 1:58
kidult11-Jan-15 1:58 
GeneralRe: how about this book? Pin
OriginalGriff11-Jan-15 2:33
mveOriginalGriff11-Jan-15 2:33 
GeneralRe: how about this book? Pin
Santosh K. Tripathi12-Jan-15 17:24
professionalSantosh K. Tripathi12-Jan-15 17:24 
GeneralRe: how about this book? Pin
kidult15-Jan-15 14:28
kidult15-Jan-15 14:28 
GeneralRe: how about this book? Pin
blachsmith16-Jan-15 15:48
blachsmith16-Jan-15 15:48 
GeneralRe: how about this book? Pin
OriginalGriff16-Jan-15 22:06
mveOriginalGriff16-Jan-15 22:06 
AnswerRe: how about this book? Pin
Kornfeld Eliyahu Peter10-Jan-15 23:00
professionalKornfeld Eliyahu Peter10-Jan-15 23:00 
GeneralRe: how about this book? Pin
kidult11-Jan-15 0:43
kidult11-Jan-15 0:43 
AnswerRe: how about this book? Pin
OriginalGriff10-Jan-15 23:00
mveOriginalGriff10-Jan-15 23:00 
GeneralRe: how about this book? Pin
kidult11-Jan-15 0:43
kidult11-Jan-15 0:43 
AnswerRe: how about this book? Pin
BillWoodruff11-Jan-15 5:13
professionalBillWoodruff11-Jan-15 5:13 
GeneralRe: how about this book? Pin
kidult15-Jan-15 14:35
kidult15-Jan-15 14:35 

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.