tama 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2e9bd53bcec2e1dd606743c1df20a664dd223398
4
+ data.tar.gz: 1075e2a0f0567d12c32fca1175a5cbd00395a763
5
+ SHA512:
6
+ metadata.gz: bbc158c9a05120371b2bbb74eb5f7394426ee2b3b793195d4b37c5f766f88b9f9a30c24c706e1650f78efbbfb529cf1dff136b1f7e1db082f07e689f05f24cec
7
+ data.tar.gz: 590cc2eb6e1e6da2bff32f493d38120e530fc263f319fcbba57cbd67f1ceed163f2504119657aad34c4602ad9b5a0201387b2d7b2523e2b5fec2333e6b5cd468
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in tama.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Mori
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # Tama
2
+
3
+ Tama est la gem de base qui servira a la construction d'application rails ou autre.<br>
4
+ Elle servira tant de librairie que d'executable.<br>
5
+ Le point a travailler sera l'accessibilité de celle ci.
6
+
7
+ ## Installation
8
+
9
+ Add this line TODO:ur application's Gemfile:
10
+
11
+ gem 'tama'
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install tama
20
+
21
+ ## Usage
22
+
23
+ Tama est une clone du tamagotchi cree par Bandai mais en amélioré.
24
+
25
+ ## Contributing
26
+
27
+ 1. Fork it ( http://github.com/<mosleymos>/tama/fork )
28
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
29
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
30
+ 4. Push to the branch (`git push origin my-new-feature`)
31
+ 5. Create new Pull Request
32
+
33
+
34
+ Variables du TAMA a intégrer
35
+
36
+ ```
37
+ module Tama
38
+ #Constantes principales du jeu
39
+ $TAMA_LIFETIME=8
40
+ $TAMA_HEALTH=100
41
+ $TAMA_MENTAL=100
42
+
43
+ #Largeur de cadre dans le cadre d'une
44
+ #implementation graphique
45
+ $HEIGHT=300
46
+ $WIDTH=300
47
+
48
+ #Etats de vie
49
+ $LIFE_STATUS=["oeuf","enfant","adulte","age","mort"]
50
+ $MENTAL_STATUS=["neutre","joyeux","depressif","triste"]
51
+ $HEALTH_STATUS=["bonne sante","malade","souffrant","agonisant","neutre"]
52
+
53
+ end
54
+ ```
55
+
56
+ Nb pour le lancement d'un nouvel animal dans le pry executer:
57
+ ```
58
+ $ rake install
59
+ $ pry
60
+ >>require 'tama'
61
+ >>tama = Tama::VirtualAnimal.new()
62
+
63
+ ```
data/Rakefile ADDED
@@ -0,0 +1,14 @@
1
+ #! usr/bin/ ruby
2
+ require "bundler/gem_tasks"
3
+
4
+
5
+ #Rake personnalise de ma part
6
+ #Documentation
7
+ namespace :mori do
8
+ desc "Gestion de la documentation"
9
+ task :doc do
10
+ `rdoc`
11
+ `echo -e '\n'`
12
+ puts "Generation de la documentation faite Mori"
13
+ end
14
+ end
data/bin/tama ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'tama'
4
+
@@ -0,0 +1,44 @@
1
+ # encoding: utf-8
2
+ module Tama
3
+ #Classe animal dont herite Virtualanimal.
4
+ #Elle contient toutes la base du tamagotchi
5
+ class Animal
6
+ @@nbreAnimal=0 #Un player ne devra pas avoir plus d'un tama
7
+ @health=0
8
+ @mental=0
9
+
10
+ #Construteur principal
11
+ def initialize
12
+ @health=100
13
+ @mental=100
14
+ @@nbreAnimal+=1
15
+ puts "Creation de l'animal \n"
16
+ end
17
+
18
+ #Fonction manger du tama
19
+ def feed(health, mental)
20
+ puts"Votre animal se nourrit \n"
21
+ return 1
22
+ end
23
+
24
+ #Fonction enseigner du tama
25
+ def teach(health, mental)
26
+ puts"Votre animal apprend quelque chose \n"
27
+ return 2
28
+ end
29
+
30
+ #Fonction soigner du tama
31
+ def cure(health, mental)
32
+ puts"Vous soignez votre animal \n"
33
+ return 3
34
+ end
35
+
36
+ #Fonction nettoyer le tama - le faire prendre
37
+ #un bain
38
+ def clean(health, mental)
39
+ puts"Vous nettoyez votre animal \n"
40
+ return 4
41
+ end
42
+
43
+ end
44
+ end
@@ -0,0 +1,7 @@
1
+ # encoding: utf-8
2
+ module Tama
3
+ #Creer une classe ou liste de constantes
4
+ #qui comprendront tout ce que devra etre
5
+ #statique sur le tama
6
+
7
+ end
@@ -0,0 +1,12 @@
1
+ # encoding: utf-8
2
+ module Tama
3
+ #Classe qui est destiné a l'utilisateur et
4
+ #a son interaction sur le tama
5
+ class Player
6
+ @name=""
7
+ @time_playing=0
8
+
9
+ def initialize
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,3 @@
1
+ module Tama
2
+ VERSION = "0.0.1"
3
+ end
data/lib/tama.rb ADDED
@@ -0,0 +1,21 @@
1
+ require "tama/version"
2
+ require "tama/animal_class"
3
+ require "tama/player_class"
4
+
5
+ # encoding: utf-8
6
+
7
+ module Tama
8
+
9
+ #Classe principale qui sert de main pour
10
+ #l'executable et d'interface pour la librairie
11
+ # Des corrections sont a faire
12
+ class VirtualAnimal<Tama::Animal
13
+
14
+ def initialize
15
+ a = Animal.new()
16
+ end
17
+
18
+ def main
19
+ end
20
+ end
21
+ end
data/tama.gemspec ADDED
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'tama/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "tama"
8
+ spec.version = Tama::VERSION
9
+ spec.authors = ["Mori"]
10
+ spec.email = ["keitamori@gmail.com"]
11
+ spec.summary = %q{Tama est un projet de tamagotchi en version informatique.}
12
+ spec.description = %q{Simulation de comportement animal en informatique.}
13
+ spec.homepage = "http://github.com/mosleymos/tama.com"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.5"
22
+ spec.add_development_dependency "rake"
23
+ spec.add_development_dependency "chronic"
24
+ spec.add_development_dependency "highline"
25
+ spec.add_development_dependency "rdoc"
26
+ end
metadata ADDED
@@ -0,0 +1,127 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tama
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Mori
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-02-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.5'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.5'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: chronic
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: highline
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rdoc
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: Simulation de comportement animal en informatique.
84
+ email:
85
+ - keitamori@gmail.com
86
+ executables:
87
+ - tama
88
+ extensions: []
89
+ extra_rdoc_files: []
90
+ files:
91
+ - ".gitignore"
92
+ - Gemfile
93
+ - LICENSE.txt
94
+ - README.md
95
+ - Rakefile
96
+ - bin/tama
97
+ - lib/tama.rb
98
+ - lib/tama/animal_class.rb
99
+ - lib/tama/constant.rb
100
+ - lib/tama/player_class.rb
101
+ - lib/tama/version.rb
102
+ - tama.gemspec
103
+ homepage: http://github.com/mosleymos/tama.com
104
+ licenses:
105
+ - MIT
106
+ metadata: {}
107
+ post_install_message:
108
+ rdoc_options: []
109
+ require_paths:
110
+ - lib
111
+ required_ruby_version: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ version: '0'
116
+ required_rubygems_version: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
121
+ requirements: []
122
+ rubyforge_project:
123
+ rubygems_version: 2.2.1
124
+ signing_key:
125
+ specification_version: 4
126
+ summary: Tama est un projet de tamagotchi en version informatique.
127
+ test_files: []