16,016,789 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by blink0 (Top 16 by date)
blink0
17-Aug-11 15:19pm
View
Thanks. I have updated my Question based on your tips but still it isn't correctly working. Thanks a lot :)
blink0
17-Aug-11 7:24am
View
I am not able to send the values from the Load method to to the Main Form and store them in the employees object. Thanks
blink0
17-Aug-11 7:23am
View
Thank you for your reply. I am work right now so can't test using static. Hope it corrects it. I can't change the return type of Load as it is specified to be boolean.
Although, I might try making another method which returns the list.
I will try and update you. Thanks a lot.
blink0
17-Aug-11 7:21am
View
Sorry, I am at work now but I will try doing what you are saying. Do you think if I remove that piece of code you suggested, will it solve the issue? I don't understand how though?
blink0
5-May-11 12:06pm
View
Lol sorry, I will look into what you have provided and then comment here if it works/or not.Many thanks
blink0
5-May-11 8:52am
View
Thanks a lot SA
Do you know how to make my critter appear on the screen?
blink0
4-May-11 19:44pm
View
here is ICritter:
public interface ICritter
{
void MoveCritter(int speed);
void StopCritter();
int Speed { get; }
int Direction { set; get; }
int Energy { get; }
int Age { get; }
int GetDirectionTo(IWorldObject other);
int GetDirectionTo(int x, int y);
Rectangle GetDestination();
bool IsTerrainBlockingRouteTo(int x, int y);
bool IsTerrainBlockingRouteTo(IWorldObject other);
Strength GetStrengthOf(IOtherCritter otherCritter);
void Attack(IOtherCritter otherCritter);
}
blink0
4-May-11 19:43pm
View
Yeah, I am confused on how to implement the Body property.
I have been given some description about it:
Once the class that implements ICritterBrain has been loaded, CritterWorld will set this property to reference an object that provides the body of the Critter. This object implements the interface ICritter and you can call methods on this object to move your Critter, attack other Critters, etc.
blink0
4-May-11 16:06pm
View
Thanks a lot mate.Cheers :)
blink0
4-May-11 15:53pm
View
Thanks.
I think you got the info I am looking for.
I made a small change:
public ICritterBrain[] CreateCritterBrains()
and now it builds.
Regarding your Point(3).
Well I am making another class to implement ICritterBrain.
It's definition is as follows:
public interface ICritterBrain
{
string Name { get; }
string Creator { get; }
Image[] Images { get; }
ICritter Body { set; }
void Birth();
void Think();
void NotifyBlockedByTerrain();
void NotifyBumped(IWorldObject otherCritter);
void NotifyEaten();
void NotifyCloseToFood(IWorldObject food);
void NotifyCloseToCritter(IOtherCritter otherCritter);
}
Is it ok for me to make a new class that implements ICritterBrain and then store values in the objects returned by Createcritter ?
like
array1[1].Name = "Dave";
Many thanks.
blink0
4-May-11 15:39pm
View
thanks a lot :)
blink0
4-May-11 15:35pm
View
Thanks Pete.
I have done something similar.Is it right?
blink0
29-Apr-11 4:53am
View
I copy pasted that from an example of DrawText but then I noticed and I was like Oh Boy lol. Thanks :)
blink0
29-Apr-11 4:48am
View
Thanks a lot it worked. :)
For anyone wondering I just replaced the Textout definition with the following:
DrawText(hdc, textBuff, -1, &clientArea, DT_CENTER | DT_VCENTER);//where DT_CENTER | DT_VCENTER is just preference
blink0
29-Apr-11 4:46am
View
Deleted
I have replaced the TextOut with the following:
DrawText(hdc, textBuff, -1, &clientArea, DT_SINGLELINE | DT_CENTER | DT_VCENTER);
Still getting the same result.
blink0
29-Apr-11 4:39am
View
Thanks, but I have tried that already.
swprintf(textBuff2, 300, L"Process %d \r\n", i+1);
wcscat(textBuff, textBuff2);
Here swprintf gets the new string i.e. Process 1 and then add it to textbuff and the loops runs again.
so process 1 process 2 process 3 gets amended to textBuff and that's the character array I am printing but it prints in a single line still.
I will try with DrawText and post my experience.
Show More