Search Results

Search found 4 results on 1 pages for 'robocode'.

Page 1/1 | 1 

  • robocode engine: how to design (write) the runtime engine -- the robot world

    - by Bob
    IBM has (had) a free learn-Java program called RoboCode, in which custom robots could be written that would then do battle in a 2D space. I would like to write the environment that supports such robots, but don't know what pattern or design to use. Each robot is a thread. Each thread is given a certain (indeterminate) amount of run-time by the JRE. A robot world engine would start by building a list of the players/robots, then enter a loop that allows each player in turn to do whatever it likes: move forward, turn left, fire toward the northwest corner, whatever. Each robot is also informed of events of interest: an enemy or several enemies are within range, it has been hit by a bullet, etc. The combination of handling threads that are also event listeners (are they also producers?) confuses me; it seems that there's more to the game engine. Even some general ideas would help. TIA.

    Read the article

  • Class Self-Reference

    - by Free Bullets
    I have the following code. The angle function needs some information from the class it was called from. What's the best way to do this? class MyScannedRobotEvent extends robocode.ScannedRobotEvent { public int angle(robocode.Robot myRobot) { return (int) Math.toRadians((myRobot.getHeading() + getBearing()) % 360); } } public class MyRobot extends robocode.Robot { int a = angle(**WHATDOIPUTHERE?**) }

    Read the article

  • DELETE causing a redirect loop?

    - by robocode
    I have an express app with a postgres backend where a user can add/delete recipes, and each time they do so they get an updated list of recipes. Adding a recipe is fine, but when I delete one it seems to get stuck in a redirect loop. In app.js I have router.get('/delete/:d', delRec.deleteRecipe); which calls the following code exports.deleteRecipe = function(req, res){ pg.connect(conString, function(err, client) { client.query('DELETE FROM recipes WHERE recipe_name = ', [req.params.d], function(err, result) { if(err) { return console.error('error running query', err); } else if (result) { pg.end(); console.log('deleting'); } }); }); res.redirect('recipes'); }; If I try delete a recipe, console.log('deleting') produces deleting deleting deleting deleting deleting deleting deleting deleting deleting deleting deleting deleting deleting deleting deleting deleting deleting deleting deleting deleting deleting The recipes route is below (sorry that it's so convoluted) router.get('/recipes', function(req, res) { pg.connect(conString, function(err, client) { if(err) { return console.error('could not connect to postgres', err); } client.query('SELECT * FROM recipes', function(err, result) { if(err) { return console.error('error running query', err); } recipes = result.rows; for(var d in recipes) { if (recipes.hasOwnProperty(d)) { recipeList[d] = recipes[d].recipe_name; } } res.render('recipes', {recipes: recipes, recipeList: recipeList}); }); }); });

    Read the article

  • CodePlex Daily Summary for Sunday, November 27, 2011

    CodePlex Daily Summary for Sunday, November 27, 2011Popular ReleasesTerminals: Version 2 - Beta 4 Release: Beta 4 Refresh Build Dont forget to backup your config files BEFORE upgrading! As usual, please take time to use and abuse this release. We left logging in place, and this is a debug build so be sure to submit your logs on each bug reported, and please do report all bugs! Updated the About form to include the date and time of the build. Useful for CI builds to ensure we have the correct version "Favourites" and "History" save their expanded states after app restarts Code cleanup, secu...MiniTwitter: 1.76: MiniTwitter 1.76 ???? ?? ?????????? User Streams ???????????? User Streams ???????????、??????????????? REST ?????????? ?????????????????????????????? ??????????????????????????????Media Companion: MC 3.424b Weekly: Ensure .NET 4.0 Full Framework is installed. (Available from http://www.microsoft.com/download/en/details.aspx?id=17718) Ensure the NFO ID fix is applied when transitioning from versions prior to 3.416b. (Details here) Movie Show Resolutions... Resolved issue when reverting multiselection of movies to "-none-" Added movie rename support for subtitle files '.srt' & '.sub' Finalised code for '-1' fix - radiobutton to choose either filename or title Fixed issue with Movie Batch Wizard Fanart - ...Advanced Windows Phone Enginering Tool: WPE Downloads: This version of WPE gives you basic updating, restoring, and, erasing for your Windows Phone device.Anno 2070 Assistant: Beta v1.0 (STABLE): Anno 2070 Assistant Beta v1.0 Released! Features Included: Complete Building Layouts for Ecos, Tycoons & Techs Complete Production Chains for Ecos, Tycoons & Techs Completed Credits Screen Known Issues: Not all production chains and building layouts may be on the lists because they have not yet been discovered. However, data is still 99.9% complete. Currently the Supply & Demand, including Calculator screen are disabled until version 1.1.Minemapper: Minemapper v0.1.7: Including updated Minecraft Biome Extractor and mcmap to support the new Minecraft 1.0.0 release (new block types, etc).Visual Leak Detector for Visual C++ 2008/2010: v2.2.1: Enhancements: * strdup and _wcsdup functions support added. * Preliminary support for VS 11 added. Bugs Fixed: * Low performance after upgrading from VLD v2.1. * Memory leaks with static linking fixed (disabled calloc support). * Runtime error R6002 fixed because of wrong memory dump format. * version.h fixed in installer. * Some PVS studio warning fixed.NetSqlAzMan - .NET SQL Authorization Manager: 3.6.0.10: 3.6.0.10 22-Nov-2011 Update: Removed PreEmptive Platform integration (PreEmptive analytics) Removed all PreEmptive attributes Removed PreEmptive.dll assembly references from all projects Added first support to ADAM/AD LDS Thanks to PatBea. Work Item 9775: http://netsqlazman.codeplex.com/workitem/9775VideoLan DotNet for WinForm, WPF & Silverlight 5: VideoLan DotNet for WinForm, WPF, SL5 - 2011.11.22: The new version contains Silverlight 5 library: Vlc.DotNet.Silverlight. A sample could be tested here The new version add and correct many features : Correction : Reinitialize some variables Deprecate : Logging API, since VLC 1.2 (08/20/2011) Add subitem in LocationMedia (for Youtube videos, ...) Update Wpf sample to use Youtube videos Many others correctionsEZ-NFC: Alpha 1: THIS IS AN ALPHA RELEASE. STILL UNSTABLE AND SUBJECT TO ARCHITECTURE CHANGE What is implemented (In alpha) : ACR122L Device Mifare 1K tag Windows frontend#liveDB: liveDB 0.3.2: New featuresNew abstract storage scheme enabling future cloud support New file system structure and naming scheme for snapshots and journal files based on sequence numbers Journal files are never deleted Automatic snapshots during load or shutdown Renamed/added hooks to Model JournalRestored, SnapshotRestored Created an extensible logging facade Journal gets split into 1MB segments (configurable) Integrity checks before during load/create Commands are cloned by default before ...ReactiveMVVM: ReactiveMVVM v1.0: Example 1 property change: public class Example1 : ViewModelBase{ string _Userid; /// <summary> /// person infomation of owner. /// </summary> public string Userid { get { return _Userid; } set { this.RaiseAndSetIfChanged(x => x.Userid, ref _Userid, value, *true*); } // true, broadcast property change message. } //if the property changed to do...... this.ObservableProperty(x => x.Useid) ...IoCWrap: Initial: Initial release of the source code.Code for Rapid C# Windows Development eBook + LINQPad and Data Tools: LinqPad Custom Visualizer Version 1.0: First release of my LinqPad Custom Visualizer. It is compiled against the Any-CPU build of LINQPad v4.36.6 so it can only be used with the LINQPad Beta: v4.36.x. To install unzip to the LinqPad plugins folder.Distributed replay GUI: Distributed Replay Snapin: This is the dll for registering the snapin in mmc.FaST-LMM: FActored Spectrally Transformed Linear Mixed Models: FaSTLMM v1.03 Binaries for Windows and Linux: These files contain the files necessary to run FaSTLMM on Windows or Linux along with the license and users manual. To download FaSTLMM source code, please follow the changeset link located above to the Source Code tab. The FaSTLMM.Win.zip download contains both C++ and CSharp executable versions of FaSTLMM. No installer is required, just UnZip the file into a directory and run from there. Or put the installation directory on your path and run it from anywhere. The C++ version included r...SharePoint 2010 FBA Pack: SharePoint 2010 FBA Pack 1.2.0: Web parts are now fully customizable via html templates (Issue #323) FBA Pack is now completely localizable using resource files. Thank you David Chen for submitting the code as well as Chinese translations of the FBA Pack! The membership request web part now gives the option of having the user enter the password and removing the captcha (Issue # 447) The FBA Pack will now work in a zone that does not have FBA enabled (Another zone must have FBA enabled, and the zone must contain the me...SharePoint 2010 Education Demo Project: Release SharePoint SP1 for Education Solutions: This release includes updates to the Content Packs for SharePoint SP1. All Content Packs have been updated to install successfully under SharePoint SP1SQL Monitor - managing sql server performance: SQLMon 4.1 alpha 6: 1. improved support for schema 2. added find reference when right click on object list 3. added object rename supportBugNET Issue Tracker: BugNET 0.9.126: First stable release of version 0.9. Upgrades from 0.8 are fully supported and upgrades to future releases will also be supported. This release is now compiled against the .NET 4.0 framework and is a requirement. Because of this the web.config has significantly changed. After upgrading, you will need to configure the authentication settings for user registration and anonymous access again. Please see our installation / upgrade instructions for more details: http://wiki.bugnetproject.c...New Projectsandrewtatham.robocode: Andrew Tatham's Robocode botsClear SharePoint Lists: This project contains the tools used to clear the items from the one or more Lists.Clipboard Editor: How many times have you pasted something in Notepad and then copied the plain text again? We do it all the time to strip formatting from the clipboard. This utility lets you pick which format from the clipboard to keep.CS New Rus: ?? ????? ??????????? ??????. ??? ??? - CS New. ?? ???? ????? ?? ????? ??????????? ??? ? ?????????? ? ???????. ElfDoc: ElfDoc enables you to create word documents from templates, using open xml.HTC RUU .NET: HTC's legendary RUU goes .NET and Open Source.................. You can browse for .nbh file, not locked at current directory and, you can update your device's rom in .NET wayMobileGamePrototype: For now just a skeleton of the architecture.NopCommerce 23 Multi Store Support: NopCommerce 23 Multi Store Support novel: fetch novelOrchard Custom Shapes: Ready to use custom orchard shapes like a table shape.Philosophy Gadget: This gadget helps people associate known works of philosophy with their known authors.ReefTracker: A controller agnostic logging and reporting application for reef aquarium controllers. SQLQuery: SQL QueryWindows Phone Marketplace Viewer: Windows Phone Marketplace Viewer is a single aspx page for asp.net 3+ with no additional dependencies. It will show the top 2000 apps in one of the 3 categories: paid and free together, only paid or only free, for all the marketplace languages.

    Read the article

1