Hot answers tagged

3

The biggest thing that will allow the code to clean up a fair bit is if you had made a subclass of Player for AIPlayer: class AIPlayer < Player NAMES = ['Bob', 'Joseph', 'Catherine', 'Paul', 'Tom', 'Baker'] def initialize super NAMES.sample end end that will allow you to add a method get_weapon to Player, which would ask for the user input ...


2

Don't think your question belongs to this code review section. You would have gotten help much faster if had posted in stackoverflow instead. Anyway there are couple points you need to check. The CreateComments migration must have been updated (or at least there was another migration that changed the table) because the migration does not say anything about ...


2

I am not a professional game developer, just trying to help you base on my experience with Ruby so far. Glad to see your willingness of coding correctly from the beginning. Some points to improve: 1.Move the bot names and game mode options to CONSTANTS 2.Prompting for user's input is duplicated many times, you should make a function that take prompting ...


Only top voted, non community-wiki answers of a minimum length are eligible