Tuesday, March 23, 2010

About C / C++ / C#: Interesting Algorithm - Darts Scoring

If you can't see this email, click here

About.com

C / C++ / C#

Fundamentals

Tips & Tools

Going Pro



From David Bolton, your Guide to C / C++ / C#
Well I'm back from my 7 day vacation in the Middle East and raring to go. I'm pleased to announce the first iPhone tutorial "My First iPhone App" has now been published, complete with source code. The details are below. BTW, if you're new to Mac from Windows, you can gain enormous productivity simply by going into System Preferences/Mouse and enabling the secondary button for all those right click menus etc. Have a Great Week!

My First iPhone App Tutorial Published
iPhone Example AppIt's a very simple App but I'm pleased with it. There's quite a learning curve towards mastery of Xcode, Objective-C, the UIKit and other frameworks so this is just the first step on a long journey and a number of tutorials to follow. The screen shots are from the simulator running on my Mac Mini. The source code and the graphic used are included in the tutorial as a download. I'll be publishing the next C# tutorial in a few days then working on the next iPhone tutorial on property, views and memory management. Hopefully by then the iPad will be out. Remember that all iPhone tutorials also apply to iPod Touch and iPad though inevitably there will be iPad specific tutorials. I've created a new section for the iPhone tutorials below. Oh and before anyone asks, I'm sorry but I'm not available for programming your project!

Darts Problem Revisisted
Reader Ben Jackson wrote an interesting email on calculating the darts scoring problem (lowest score that you can't get with three darts) and included a 170 line C++ program to solve it. With his permission, I've included it here as a download. It uses three methods to compute which scores are impossible for the general case of throwing D darts at a dart board with W wedges and including doubles and trebles. 0, (a miss), 25 and 50 can be switched on via some macros. I've also added it as a permanent link below.

NAEV - Open Source Space Trading Game in C
NAEV ScreenshotBack in 1984 the big game release was Elite, a space trading and combat game that well deserved its accolades and gave it a place in computer gaming history. I played it a lot on the BBC so have a soft spot for this type of game. It's not the most popular game genre but the space trading and combat genre has had a few well known games such as Wing Commander:Privateer, Escape Velocity, and Elite in various other versions. In fact 26 years on from the original, Elite 4 is currently under development by a team including one of the original developers David Braben. But as always its the open source versions that interest me. Written in C, with scripting in Lua, NAEV is an open source version of Escape Velocity and is cross-platform for Windows, Mac and Linux. The initials are Not Another Escape Velocity. There's also a Wikipedia article about the game though curiously that is marked for deletion.

Never Programmed Before? Start Here
For the complete novice to computer programming. Learn how a computer works and how to control it by writing computer programs.

 


C / C++ / C# Ads
Featured Articles
Other Blogs You might find Interesting
Welcome to the C Area with Articles about C Programming
Welcome to the C++ Area with Articles about C++ Development
Welcome to the C Sharp Area with Articles about C Sharp Development
Learn about Commercial Software Development
All about Games Programming

 

More from About.com

Disney Trip Planner
Everything you need to plan the perfect Disney vacation -- from when to go and what to do, to saving money and picking a hotel. More >

Join About.com's User Panel!
Share your opinions and help us make make About.com more relevant, informative and enjoyable to use. More>


This newsletter is written by:
David Bolton
C / C++ / C# Guide
Email Me | My Blog | My Forum
 
Sign up for more free newsletters on your favorite topics
You are receiving this newsletter because you subscribed to the About C / C++ / C# newsletter. If you wish to change your email address or unsubscribe, please click here.

About respects your privacy: Our Privacy Policy

Contact Information:
249 West 17th Street
New York, NY, 10011

© 2010 About.com
 


Must Reads
Programming Challenges
About C, C++ and C#
C++ for Beginners
C++ Programming
Intro to OOP

Advertisement

No comments: