Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gerenciamento de dependências #4

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.9.3-p551
7 changes: 7 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

source 'https://rubygems.org'

git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }

gem 'gosu', '~> 0.14.0'
13 changes: 13 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
GEM
remote: https://rubygems.org/
specs:
gosu (0.14.0)

PLATFORMS
ruby

DEPENDENCIES
gosu (~> 0.14.0)

BUNDLED WITH
1.16.1
22 changes: 19 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,28 @@ Projeto inicialmente criado como projeto para a disciplina de Introdução a Pro

Em sua primeira versão, o projeto era um game inspirado no clássico [Super Bomberman](https://pt.wikipedia.org/wiki/Bomberman), a ideia agora é desenvolver um game mais fiel aos da franquia Bomberman com o diferencial de ser algo feito pela comunidade.

## Dependências

Esse projeto utiliza a biblioteca [Gosu](https://www.libgosu.org) para construir as telas em 2D. E por isso é necessário ter instalado [SDL 2](http://www.libsdl.org/).

## Executando o projeto

- Instale o [Ruby](https://rubyinstaller.org/downloads/) no seu computador.
- Acesse a pasta do projeto e execute:
Instale o [Ruby 1.9.3](https://rubyinstaller.org/downloads/) no seu computador. Depois do ruby instalado instale também `bundler` gem.

```bash
gem install bundler
```

Instale as dependências do projeto através do comando:
```bash
bundle install
```

Acesse a diretório do projeto e execute:

`$ ruby game.rb `
```bash
ruby game.rb
```

## Contribuindo

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
286 changes: 143 additions & 143 deletions boss.rb

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions game.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ def initialize
@gameover_screen = Gosu::Image.new("images/gameOver.png")

# Sons utilizados no jogo
@option_sound_effect = Gosu::Sample.new("audio/opçãoSom.wav")
@option_sound_effect = Gosu::Sample.new("audio/opcao_som.wav")
@damage_sound_effect = Gosu::Sample.new("audio/bomba_som.wav")
@battle_map_soundtrack = Gosu::Song.new("audio/Battle.wav")
@title_screen_soundtrack = Gosu::Song.new("audio/TitleScreen.wav")
@gameover_screen_soundtrack = Gosu::Song.new("audio/GameOver.wav")
@battle_map_soundtrack = Gosu::Song.new("audio/battle.wav")
@title_screen_soundtrack = Gosu::Song.new("audio/title_screen.wav")
@gameover_screen_soundtrack = Gosu::Song.new("audio/game_over.wav")
@winner_screen_soundtrack = Gosu::Song.new("audio/win.wav")

# Array responsável por controlar quantidade de bombas
Expand Down Expand Up @@ -89,7 +89,7 @@ def update
@distanciaBomba = Gosu::distance(bomb.x, bomb.y, @boss.x, @boss.y)
if @distanciaBomba - 10 < bomb.radius + @boss.radius then
if bomb.finished == true then
@boss.quantidadeDeVidas -= 1
@boss.quantidade_de_vidas -= 1
@image_index = 0 #reiniciar animação
end
end
Expand All @@ -99,7 +99,7 @@ def update
@estado = :over
end
#Condições que levam a vitória
if @boss.quantidadeDeVidas == 0
if @boss.quantidade_de_vidas == 0
@estado = :winner
end
when :over
Expand Down Expand Up @@ -169,7 +169,7 @@ def button_down(id)
@bombs = []
@timer = Timer.new
@player = Player.new(self)
# @boss = Boss.new(self)
@boss = Boss.new(self)
end
if @option == 2 then
@estado = :tutorial
Expand Down