Home › Per Nystrom (Command pattern), a 'Command' objec…
Per Nystrom (Command pattern), a 'Command' object typically does which?
AEncapsulates an action as a first-class object
BRuns only once on engine startup time
CReturns the current frame number always
DCalls the operating system shell directly
Answer & Solution
Correct answer: A. Encapsulates an action as a first-class object
Nystrom Ch. Command: input/AI/network turn an action into a Command object so it can be queued, undone, replayed, or redirected.
Related questions
Per Nystrom (Singleton chapter), Nystrom's view of the Singleton pattern in games is best Per Nystrom (Service Locator), the Service Locator pattern provides which feature?Per Nystrom (Spatial Partition), structures like quadtrees / BVH speed up which game operaPer Nystrom (Event Queue), queueing events between producer and consumer DECOUPLES them inPer Nystrom (Double Buffer), separating current vs next-frame state prevents which artifacPer Nystrom (Object Pool), reusing pre-allocated objects instead of new/delete each frame Per Nystrom (State pattern), modelling a character with 'standing', 'jumping', 'ducking' bPer Nystrom (Observer), the Observer pattern is also commonly known by which other name?