Module: GamesParadise

Defined in:
lib/games_paradise/base/base.rb,
lib/games_paradise/chess/chess.rb,
lib/games_paradise/base/colours.rb,
lib/games_paradise/godmode/time.rb,
lib/games_paradise/godmode/warn.rb,
lib/games_paradise/godmode/quest.rb,
lib/games_paradise/mechwars/mech.rb,
lib/games_paradise/memory/memory.rb,
lib/games_paradise/godmode/player.rb,
lib/games_paradise/mechwars/arena.rb,
lib/games_paradise/solitaire/card.rb,
lib/games_paradise/antamar/antamar.rb,
lib/games_paradise/colours/colours.rb,
lib/games_paradise/hangman/hangman.rb,
lib/games_paradise/project/project.rb,
lib/games_paradise/version/version.rb,
lib/games_paradise/godmode/gameplay.rb,
lib/games_paradise/mechwars/vehicle.rb,
lib/games_paradise/solitaire/player.rb,
lib/games_paradise/godmode/gladiator.rb,
lib/games_paradise/hangman/ascii_art.rb,
lib/games_paradise/nibbles/constants.rb,
lib/games_paradise/tetris/gtk3/tetris.rb,
lib/games_paradise/constants/constants.rb,
lib/games_paradise/gui/gtk3/block/ball.rb,
lib/games_paradise/gui/gtk3/block/wall.rb,
lib/games_paradise/solitaire/constants.rb,
lib/games_paradise/solitaire/solitaire.rb,
lib/games_paradise/gui/gosu/memory/game.rb,
lib/games_paradise/gui/gtk3/block/block.rb,
lib/games_paradise/gui/gtk3/block/walls.rb,
lib/games_paradise/gui/gtk3/snake/snake.rb,
lib/games_paradise/might_and_magic/hero.rb,
lib/games_paradise/toplevel_methods/cat.rb,
lib/games_paradise/toplevel_methods/rev.rb,
lib/games_paradise/gui/gosu/tetris/block.rb,
lib/games_paradise/gui/gosu/tetris/shape.rb,
lib/games_paradise/gui/gtk3/block/blocks.rb,
lib/games_paradise/gui/gtk3/block/paddle.rb,
lib/games_paradise/gui/gtk3/block/screen.rb,
lib/games_paradise/minesweeper/constants.rb,
lib/games_paradise/toplevel_methods/misc.rb,
lib/games_paradise/gui/gosu/billiard/ball.rb,
lib/games_paradise/gui/gosu/sokoban/level.rb,
lib/games_paradise/gui/gtk3/memory/memory.rb,
lib/games_paradise/mastermind/gtk2/circle.rb,
lib/games_paradise/mastermind/gtk3/circle.rb,
lib/games_paradise/mechwars/world_credits.rb,
lib/games_paradise/commandline/commandline.rb,
lib/games_paradise/flappy_bird/gosu/flappy.rb,
lib/games_paradise/gui/gosu/1010/game_1010.rb,
lib/games_paradise/gui/gosu/sokoban/zlevel.rb,
lib/games_paradise/gui/gosu/tetris/shape_i.rb,
lib/games_paradise/gui/gosu/tetris/shape_j.rb,
lib/games_paradise/gui/gosu/tetris/shape_l.rb,
lib/games_paradise/gui/gosu/tetris/shape_s.rb,
lib/games_paradise/gui/gosu/tetris/shape_t.rb,
lib/games_paradise/gui/gosu/tetris/shape_z.rb,
lib/games_paradise/minesweeper/grid_placer.rb,
lib/games_paradise/shakes_and_fidgets/game.rb,
lib/games_paradise/tic_tac_toe/tic_tac_toe.rb,
lib/games_paradise/fallout/web_related_code.rb,
lib/games_paradise/gui/gosu/hangman/hangman.rb,
lib/games_paradise/gui/gosu/sokoban/sokoban.rb,
lib/games_paradise/gui/gtk3/hangman/hangman.rb,
lib/games_paradise/gui/gtk3/nibbles/nibbles.rb,
lib/games_paradise/minesweeper/terminal/cli.rb,
lib/games_paradise/baldurs_gate/baldurs_gate.rb,
lib/games_paradise/gui/gosu/battle_city/fort.rb,
lib/games_paradise/gui/gosu/battle_city/tank.rb,
lib/games_paradise/gui/gosu/battle_city/wall.rb,
lib/games_paradise/gui/gosu/memory/constants.rb,
lib/games_paradise/gui/gosu/memory/play_game.rb,
lib/games_paradise/gui/gosu/tetris/constants.rb,
lib/games_paradise/gui/gosu/tic_tac_toe/game.rb,
lib/games_paradise/might_and_magic/character.rb,
lib/games_paradise/minesweeper/terminal/game.rb,
lib/games_paradise/minesweeper/terminal/grid.rb,
lib/games_paradise/prototypes/gosu_prototype.rb,
lib/games_paradise/vier_gewinnt/vier_gewinnt.rb,
lib/games_paradise/gui/gosu/battle_city/brick.rb,
lib/games_paradise/gui/gosu/billiard/billiard.rb,
lib/games_paradise/gui/gosu/memory/game_ended.rb,
lib/games_paradise/gui/gosu/tetris/shape_cube.rb,
lib/games_paradise/gui/gosu/tic_tac_toe/board.rb,
lib/games_paradise/kaiser/module_methods/misc.rb,
lib/games_paradise/mastermind/gtk2/mastermind.rb,
lib/games_paradise/mastermind/gtk3/mastermind.rb,
lib/games_paradise/might_and_magic/hero_types.rb,
lib/games_paradise/minesweeper/terminal/error.rb,
lib/games_paradise/minesweeper/terminal/field.rb,
lib/games_paradise/minesweeper/terminal/intro.rb,
lib/games_paradise/gui/gosu/battle_city/cannon.rb,
lib/games_paradise/gui/gosu/battle_city/player.rb,
lib/games_paradise/gui/gosu/battle_city/window.rb,
lib/games_paradise/gui/gosu/billiard/constants.rb,
lib/games_paradise/gui/gosu/final_fantasy/game.rb,
lib/games_paradise/gui/gosu/hangman/text_field.rb,
lib/games_paradise/gui/gosu/tetris/game_window.rb,
lib/games_paradise/gui/gosu/tic_tac_toe/square.rb,
lib/games_paradise/gui/shared_code/memory/card.rb,
lib/games_paradise/kaiser/module_methods/money.rb,
lib/games_paradise/base/base_module/base_module.rb,
lib/games_paradise/gui/gosu/aero_exploder/enemy.rb,
lib/games_paradise/gui/gosu/final_fantasy/chest.rb,
lib/games_paradise/gui/gosu/final_fantasy/mages.rb,
lib/games_paradise/gui/gosu/final_fantasy/snake.rb,
lib/games_paradise/gui/gtk3/solitaire/solitaire.rb,
lib/games_paradise/hello_world/gosu/hello_world.rb,
lib/games_paradise/shakes_and_fidgets/menu/menu.rb,
lib/games_paradise/defender_of_the_crown/economy.rb,
lib/games_paradise/gui/gosu/aero_exploder/cursor.rb,
lib/games_paradise/gui/gosu/final_fantasy/player.rb,
lib/games_paradise/gui/gosu/final_fantasy/screen.rb,
lib/games_paradise/gui/gtk2/xmas_gifts/xmas_gifts.rb,
lib/games_paradise/gui/gtk3/nibbles/nibbles_board.rb,
lib/games_paradise/kaiser/module_methods/language.rb,
lib/games_paradise/mastermind/gtk2/icon_and_label.rb,
lib/games_paradise/mastermind/gtk3/icon_and_label.rb,
lib/games_paradise/minesweeper/terminal/generator.rb,
lib/games_paradise/shakes_and_fidgets/arena/arena.rb,
lib/games_paradise/constants/files_and_directories.rb,
lib/games_paradise/gui/gosu/battle_city/enemy_tank.rb,
lib/games_paradise/gui/gosu/battle_city/enemy_team.rb,
lib/games_paradise/gui/gtk2/xmas_gifts/gift_button.rb,
lib/games_paradise/gui/gtk3/minesweeper/mine_field.rb,
lib/games_paradise/gui/gtk3/tic_tac_toe/game_board.rb,
lib/games_paradise/mastermind/gtk2/black_white_box.rb,
lib/games_paradise/mastermind/gtk3/black_white_box.rb,
lib/games_paradise/gui/gosu/final_fantasy/colliders.rb,
lib/games_paradise/gui/gosu/final_fantasy/mushrooms.rb,
lib/games_paradise/gui/gosu/particle_simulator/main.rb,
lib/games_paradise/gui/gosu/particle_simulator/prey.rb,
lib/games_paradise/gui/gtk3/minesweeper/smiley_face.rb,
lib/games_paradise/gui/gtk3/tic_tac_toe/tic_tac_toe.rb,
lib/games_paradise/mastermind/shared_code/constants.rb,
lib/games_paradise/shakes_and_fidgets/armour/armour.rb,
lib/games_paradise/shakes_and_fidgets/shared/shared.rb,
lib/games_paradise/shakes_and_fidgets/misc/opponents.rb,
lib/games_paradise/gui/gosu/duck_hunt_calculator/duck.rb,
lib/games_paradise/gui/gosu/particle_simulator/entity.rb,
lib/games_paradise/gui/gosu/particle_simulator/hunter.rb,
lib/games_paradise/gui/gtk3/four_in_a_row/game_button.rb,
lib/games_paradise/gui/shared_code/snake/snake_module.rb,
lib/games_paradise/shakes_and_fidgets/project/project.rb,
lib/games_paradise/gui/jruby/vier_gewinnt/vier_gewinnt.rb,
lib/games_paradise/asteroids_fighter/gui/gtk3/constants.rb,
lib/games_paradise/defender_of_the_crown/user_interface.rb,
lib/games_paradise/gui/gosu/aero_exploder/aero_exploder.rb,
lib/games_paradise/gui/gtk3/four_in_a_row/four_in_a_row.rb,
lib/games_paradise/gui/shared_code/memory/memory_module.rb,
lib/games_paradise/mastermind/shared_code/circle_module.rb,
lib/games_paradise/utility_scripts/create_games_webpage.rb,
lib/games_paradise/gui/gtk3/might_and_magic/party_viewer.rb,
lib/games_paradise/gui/gtk3/minesweeper/minesweeper_game.rb,
lib/games_paradise/tic_tac_toe/tic_tac_toe_with_AI/board.rb,
lib/games_paradise/flappy_bird/ruby2d/constants/constants.rb,
lib/games_paradise/gui/gosu/particle_simulator/smart_prey.rb,
lib/games_paradise/gui/shared_code/hangman/hangman_module.rb,
lib/games_paradise/minesweeper/terminal/default_decorator.rb,
lib/games_paradise/shakes_and_fidgets/adventure/adventure.rb,
lib/games_paradise/shakes_and_fidgets/character/character.rb,
lib/games_paradise/shakes_and_fidgets/constants/constants.rb,
lib/games_paradise/tic_tac_toe/tic_tac_toe_with_AI/engine.rb,
lib/games_paradise/tic_tac_toe/tic_tac_toe_with_AI/player.rb,
lib/games_paradise/minesweeper/terminal/default_randomiser.rb,
lib/games_paradise/tetris/shared_code/tetris/tetris_module.rb,
lib/games_paradise/baldurs_gate/repackage_baldurs_gate_mods.rb,
lib/games_paradise/mastermind/shared_code/mastermind_module.rb,
lib/games_paradise/shakes_and_fidgets/stadtwache/stadtwache.rb,
lib/games_paradise/shakes_and_fidgets/user_input/user_input.rb,
lib/games_paradise/shakes_and_fidgets/post_office/post_office.rb,
lib/games_paradise/shakes_and_fidgets/waffenladen/waffenladen.rb,
lib/games_paradise/shakes_and_fidgets/zauberladen/zauberladen.rb,
lib/games_paradise/defender_of_the_crown/defender_of_the_crown.rb,
lib/games_paradise/mastermind/shared_code/icon_and_label_module.rb,
lib/games_paradise/shakes_and_fidgets/hall_of_fame/hall_of_fame.rb,
lib/games_paradise/gui/shared_code/minesweeper/mine_field_module.rb,
lib/games_paradise/mastermind/shared_code/black_white_box_module.rb,
lib/games_paradise/gui/shared_code/minesweeper/smiley_face_module.rb,
lib/games_paradise/shakes_and_fidgets/gui/gtk3/shakes_and_fidgets.rb,
lib/games_paradise/gui/shared_code/vier_gewinnt/vier_gewinnt_module.rb,
lib/games_paradise/gui/gosu/duck_hunt_calculator/duck_hunt_calculator.rb,
lib/games_paradise/gui/shared_code/four_in_a_row/four_in_a_row_module.rb,
lib/games_paradise/utility_scripts/dosbox_wrapper/gtk3/dosbox_wrapper.rb,
lib/games_paradise/gui/shared_code/minesweeper/minesweeper_game_module.rb,
lib/games_paradise/shakes_and_fidgets/module_methods/files_and_directories.rb,
lib/games_paradise/utility_scripts/dosbox_wrapper/shared_code/dosbox_wrapper_module.rb

Overview

#

GamesParadise::GUI::Gtk::DosboxWrapperModule

#

require ‘games_paradise/utility_scripts/dosbox_wrapper/shared_code/dosbox_wrapper_module.rb’ include ::GamesParadise::GUI::Gtk::DosboxWrapperModule

#

Defined Under Namespace

Modules: BaldursGate, BaseModule, Billiard, Chess, Colours, DefenderOfTheCrown, Fallout, FlappyBird, GUI, Godmode, Kaiser, Mechwars, Memory, MightAndMagic, Minesweeper, Nibbles, ParticleSimulator, ShakesAndFidgets, Solitaire, Tetris, TicTacToe Classes: Antamar, Base, Board, Brick, Cannon, Chest, Colliders, Commandline, CreateGamesWebpage, Cursor, Duck, DuckHuntCalculatorGame, Enemy, EnemyTank, EnemyTeam, Engine, Fort, GameWindow, Game_Window, Hangman, HelloWorld, Mages, Mushrooms, Player, RepackageBaldursGateMods, Screen, Shoot, Snake, Tank, VierGewinnt, Wall

Constant Summary collapse

WHITE =
#

WHITE

#
"\e[0;37m"
PROJECT_BASE_DIRECTORY =
#

PROJECT_BASE_DIRECTORY

#
File.absolute_path("#{__dir__}/..")+'/'
PROJECT_YAML_DIR =
#

PROJECT_YAML_DIR

#
PROJECT_BASE_DIRECTORY+'yaml/'
VERSION =
#

VERSION

#
'0.0.106'
LAST_UPDATE =
#

LAST_UPDATE

#
'05.10.2023'
UNHAPPY_SMILEY =
#

UNHAPPY_SMILEY

We can either use the ASCII variant or the Unicode variant. I prefer the unicode variant these days.

#
'😥️'

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.bold_yellow(i) ⇒ Object

#

ShakesAndFidget.bold_yellow

#


23
24
25
# File 'lib/games_paradise/colours/colours.rb', line 23

def self.bold_yellow(i)
  ::Colours.bold_yellow(i)
end

.cat(i) ⇒ Object

#

GamesParadise.cat

This will read and display file content.

#


14
15
16
17
18
19
20
# File 'lib/games_paradise/toplevel_methods/cat.rb', line 14

def self.cat(i)
  if File.exist? i
    e File.readlines(i).join
  else
    e 'Can not read from file '+sfile(i)+' as it does not exist.'
  end
end

.chdir(i) ⇒ Object

#

GamesParadise.chdir (chdir tag, cd tag)

#


15
16
17
# File 'lib/games_paradise/toplevel_methods/misc.rb', line 15

def self.chdir(i)
  Dir.chdir(i)
end

.file_good_dos_gamesObject

#

GamesParadise.file_good_dos_games

#


15
16
17
# File 'lib/games_paradise/constants/files_and_directories.rb', line 15

def self.file_good_dos_games
  "#{::GamesParadise.project_yaml_directory?}good_dos_games/good_dos_games.yml"
end

.file_good_windows_gamesObject

#

GamesParadise.file_good_windows_games

#


22
23
24
# File 'lib/games_paradise/constants/files_and_directories.rb', line 22

def self.file_good_windows_games
  "#{::GamesParadise.project_yaml_directory?}good_windows_games/good_windows_games.yml"
end

.image_directory?Boolean

#

GamesParadise.image_directory?

#

Returns:

  • (Boolean)


29
30
31
# File 'lib/games_paradise/constants/files_and_directories.rb', line 29

def self.image_directory?
  "#{::GamesParadise.project_base_directory?}images/"
end

.mkdir(i) ⇒ Object

#

GamesParadise.mkdir

#


22
23
24
# File 'lib/games_paradise/toplevel_methods/misc.rb', line 22

def self.mkdir(i)
  FileUtils.mkdir_p(i)
end

.project_base_directory?Boolean

#

GamesParadise.project_base_directory?

#

Returns:

  • (Boolean)


25
26
27
# File 'lib/games_paradise/project/project.rb', line 25

def self.project_base_directory?
  PROJECT_BASE_DIRECTORY
end

.project_image_directory?Boolean

#

GamesParadise.project_image_directory?

#

Returns:

  • (Boolean)


40
41
42
# File 'lib/games_paradise/project/project.rb', line 40

def self.project_image_directory?
  "#{PROJECT_BASE_DIRECTORY}images/"
end

.project_yaml_directory?Boolean

#

GamesParadise.project_yaml_directory?

#

Returns:

  • (Boolean)


33
34
35
# File 'lib/games_paradise/project/project.rb', line 33

def self.project_yaml_directory?
  "#{PROJECT_BASE_DIRECTORY}yaml/"
end

.revObject

#

GamesParadise.rev

The main colour.

#


18
19
20
21
22
23
24
# File 'lib/games_paradise/toplevel_methods/rev.rb', line 18

def self.rev
  if Object.const_defined? :Colours
    ::ShakesAndFidgets::WHITE
  else
    ''
  end
end

Instance Method Details

#revObject

#

rev

#


30
31
32
# File 'lib/games_paradise/colours/colours.rb', line 30

def rev
  ::GamesParadise.rev
end