Built with R, this code allows the user to simulate the game of basketball. While the main focus is on simulating the NBA, the code provides a framework for simulating other leagues by modifying the default set of rules.