In this paper, we demonstrate the use of design patterns to develop games for mobile devices on the J2ME platform. We believe that the proposed idea will help J2ME game developers to write better re-usable code faster. We consider a single player Sudoku board game which is based on the model-view-controller architecture. The view is configured with a Game Controller Choice pattern so that different controllers can be selected. The view and the model implement the Game State Observer pattern. The Canvas drawing logic is created using the Drawing Template pattern, which ensures reusability of the board size computation as well as provides a means for the programmer to implement game specific drawing functionalities. A generic undo method is provided using the Game Memento pattern. Setting of the current display is achieved through the Change Screen pattern. We note that the use of patterns in the Sudoku game makes it possible to cater for changes without breaking up the overall architecture of the game. By considering a downgraded version of the standard Soduko game, we show that patterns allow modifications to be made without opening up too many classes. We also show how the proposed design of the Sudoku game facilitates the design of other games.
In this paper we consider the partial integro-differential equation (PIDE) arising when a stock follows a Poisson distributed jump process, for the pricing of Asian options. We make use of the meshless radial basis functions with differential quadrature (RBFDQ) for approximating the spatial derivatives and demonstrate that the algorithm performs effectively well as compared to the commonly employed finite difference approximations. We also employ Strang splitting with the exponential time integration (ETI) technique to improve temporal efficiency. Throughout the numerical experiments covered in the paper, we show how the proposed scheme can be efficiently employed for the pricing of American style Asian options under both the Black-Scholes and the Merton jump diffusion models.
a b s t r a c tWe study the stability of zero-fill incomplete LU factorizations of a nine-point coefficient matrix arising from a high-order compact discretisation of a two-dimensional constantcoefficient convection-diffusion problem. Nonlinear recurrences for computing entries of the lower and upper triangular matrices are derived and we show that the sequence of diagonal entries of the lower triangular factor is unconditionally convergent. A theoretical estimate of the limiting value is derived and we show that this estimate is a good predictor of the computed value. The unconditional convergence of the diagonal sequence of the lower triangular factor to a positive limit implies that the incomplete factorization process never encounters a zero pivot and that the other diagonal sequences are also convergent. The characteristic polynomials associated with the lower and upper triangular solves that occur during the preconditioning step are studied and conditions for the stability of the triangular solves are derived in terms of the entries of the tridiagonal matrices appearing in the lower and upper subdiagonals of the block triangular system matrix and a triplet of parameters which completely determines the solution of the nonlinear recursions. Results of ILU-preconditioned GMRES iterations and the effects of orderings on their convergence are also described.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.