Search Results

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

Page 1/1 | 1 

  • Are there any ball tracking algorithms/patterns around in game programming

    - by user214626
    Hello, I am a newbie to game programming,I would need the suggestions and help of the wonderful people around here. I have set of players, and a ball, the players can kick the ball around the ground (not yet a football game, neither a foosball game too ).Are there any algorithms/ patterns for addressing the problems with tracking the ball and taking decisions, Is that too much to ask.What I was looking at is something like a collision detection algorithm for the common problem of 2 objects interacting with one another.

    Read the article

  • Frameworks to manage dates (effective date and expiry dates)

    - by user214626
    Hello, We have an object that can has an effective date and expiry date.(Ex. i want to maintain the price of a commodity for a time period) Business Rules - Effective date is always a valid date (a datestamp) but, expiry date can be null to indicate that the object is active throughout. Also, both effective and expiry date can be set to some valid dates. Are there any frameworks that manage objects such that the objects are consistent,i.e there are no overlaps of the validity periods ? Ex. class XBOX { double price; Date effectiveDate; Date expiryDate; } XBOX x1 = new XBOX(400$, '2007-01-01','2008-12-31' ); XBOX x2 = new XBOX(200$, '2009-01-01',null ); Assume that we get a new rate from '2010-01-01' and a new XBOX object has to be created (to persist). Is there a framework/pattern that can do the following, so that the XBOX is consistent. x2.setExpiryDate('2009-12-31') XBOX x3 = new XBOX(150$, '2010-01-01',null ); Thanks in advance.

    Read the article

  • What is the best way to handle validity dates in applications ?

    - by user214626
    Hello, How do we model these objects ? Scenario 1: Price changes in a time period EffectiveDate ExpiryDate Price 2009-01-01 2009-01-31 800$ 2009-02-01 Null 900$ So, if the price changes to 910$ on 2009-02-15, then the system should automatically update the expiry date on the previous effective price to 2009-02-14, to keep it consistent. Scenario 2: No price specified between 2009-02-01 to 2009-02-28 EffectiveDate ExpiryDate Price 2009-01-01 2009-01-31 800$ 2009-03-01 Null 900$ So, if new price is specified for 2009-02-15 onwards , then the system should automatically set the expiry date on the record to be inserted to 2009-02-28, because already a record effective from 2009-03-01 exists. Please suggest an effective way to handle these scenarios to model my framework, or are there any frameworks around that can do this . Thanks

    Read the article

  • Can I change class types in a setter with an object-oriented language?

    - by user214626
    Hello, Here is the problem statement : Calling a setter on the object should result in the object to change to an object of a different class, which language can support this ? Ex. I have a class called "Man" (Parent Class), and two children namely "Toddler" and "Old Man", they are its children because they override a behaviour in Man called as walk.( i.e Toddler sometimes walks using both his hands and legs kneeled down and the Old man uses a stick to support himself). The Man class has a attribute called age, I have a setter on Man,say it is called setAge(int ageValue). I have 3 objects, 2 toddlers, 1 old-Man. (The system is up and running,i guess when we say objects it is obvious) .I will make this call, toddler.setAge(80), I expect the toddler to change to an object of type Old Man. Is this possible.Please suggest. Thanks,

    Read the article

1