diff --git a/BlackJack/blackjack.py b/BlackJack/blackjack.py
deleted file mode 100644
index 124a83d..0000000
--- a/BlackJack/blackjack.py
+++ /dev/null
@@ -1,119 +0,0 @@
-# master
-# BLACK JACK - CASINO A GAME OF FORTUNE!!!
-import time
-
-# BLACK JACK - CASINO
-# PYTHON CODE BASE
-
-
-# master
-import random
-
-deck = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11] * 4
-
-random.shuffle(deck)
-
-print(f'{"*"*58} \n Welcome to the game Casino - BLACK JACK ! \n{"*"*58}')
-time.sleep(2)
-print('So Finally You Are Here To Accept Your Fate')
-time.sleep(2)
-print('I Mean Your Fortune')
-time.sleep(2)
-print('Lets Check How Lucky You Are Wish You All The Best')
-time.sleep(2)
-print('Loading---')
-time.sleep(2)
-
-print('Still Loading---')
-time.sleep(2)
-print('So You Are Still Here Not Gone I Gave You Chance But No Problem May Be You Trust Your Fortune A Lot \n Lets Begin Then')
-time.sleep(2)
-d_cards = [] # Initialising dealer's cards
-p_cards = [] # Initialising player's cards
-time.sleep(2)
-while len(d_cards) != 2:
- random.shuffle(deck)
- d_cards.append(deck.pop())
- if len(d_cards) == 2:
- print('The cards dealer has are X ', d_cards[1])
-
-# Displaying the Player's cards
-while len(p_cards) != 2:
- random.shuffle(deck)
- p_cards.append(deck.pop())
- if len(p_cards) == 2:
- print("The total of player is ", sum(p_cards))
- print("The cards Player has are ", p_cards)
-
-if sum(p_cards) > 21:
- print(f"You are BUSTED !\n {'*'*14}Dealer Wins !!{'*'*14}\n")
- exit()
-
-if sum(d_cards) > 21:
- print(f"Dealer is BUSTED !\n {'*'*14} You are the Winner !!{'*'*18}\n")
- exit()
-
-if sum(d_cards) == 21:
- print(f"{'*'*24}Dealer is the Winner !!{'*'*14}")
- exit()
-
-if sum(d_cards) == 21 and sum(p_cards) == 21:
- print(f"{'*'*17}The match is tie !!{'*'*25}")
- exit()
-
-
-# function to show the dealer's choice
-def dealer_choice():
- if sum(d_cards) < 17:
- while sum(d_cards) < 17:
- random.shuffle(deck)
- d_cards.append(deck.pop())
-
- print("Dealer has total " + str(sum(d_cards)) + "with the cards ", d_cards)
-
- if sum(p_cards) == sum(d_cards):
- print(f"{'*'*15}The match is tie !!{'*'*15}")
- exit()
-
- if sum(d_cards) == 21:
- if sum(p_cards) < 21:
- print(f"{'*'*23}Dealer is the Winner !!{'*'*18}")
- elif sum(p_cards) == 21:
- print(f"{'*'*20}There is tie !!{'*'*26}")
- else:
- print(f"{'*'*23}Dealer is the Winner !!{'*'*18}")
-
- elif sum(d_cards) < 21:
- if sum(p_cards) < 21 and sum(p_cards) < sum(d_cards):
- print(f"{'*'*23}Dealer is the Winner !!{'*'*18}")
- if sum(p_cards) == 21:
- print(f"{'*'*22}Player is winner !!{'*'*22}")
- if 21 > sum(p_cards) > sum(d_cards):
- print(f"{'*'*22}Player is winner !!{'*'*22}")
-
- else:
- if sum(p_cards) < 21:
- print(f"{'*'*22}Player is winner !!{'*'*22}")
- elif sum(p_cards) == 21:
- print(f"{'*'*22}Player is winner !!{'*'*22}")
- else:
- print(f"{'*'*23}Dealer is the Winner !!{'*'*18}")
-
-
-while sum(p_cards) < 21:
-
- # to continue the game again and again !!
- k = input('Want to hit or stay?\n Press 1 for hit and 0 for stay ')
- if k == 1:
- random.shuffle(deck)
- p_cards.append(deck.pop())
- print('You have a total of ' + str(sum(p_cards))
- + ' with the cards ', p_cards)
- if sum(p_cards) > 21:
- print(f'{"*"*13}You are BUSTED !{"*"*13}\n Dealer Wins !!')
- if sum(p_cards) == 21:
- print(f'{"*"*19}You are the Winner !!{"*"*29}')
-
- else:
- dealer_choice()
- break
diff --git a/BlackJack/blackjack_rr.py b/BlackJack/blackjack_rr.py
deleted file mode 100644
index 6941f5e..0000000
--- a/BlackJack/blackjack_rr.py
+++ /dev/null
@@ -1,237 +0,0 @@
-import random
-
-class Colour:
- BLACK = '\033[30m'
- RED = '\033[91m'
- GREEN = '\033[32m'
- END = '\033[0m'
-
-suits = (Colour.RED + 'Hearts' + Colour.END, Colour.RED + 'Diamonds' + Colour.END, Colour.BLACK + 'Spades' + Colour.END, Colour.BLACK + 'Clubs' + Colour.END)
-ranks = ('Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten', 'Jack', 'Queen', 'King', 'Ace')
-values = {'Two': 2, 'Three': 3, 'Four': 4, 'Five': 5, 'Six': 6, 'Seven': 7, 'Eight': 8,
- 'Nine': 9, 'Ten': 10, 'Jack': 10, 'Queen': 10, 'King': 10, 'Ace': 11}
-
-playing = True
-
-class Card:
-
- def __init__(self, suit, rank):
- self.suit = suit
- self.rank = rank
-
- def __str__(self):
- return self.rank + ' of ' + self.suit
-
-
-class Deck:
-
- def __init__(self):
- self.deck = []
- for suit in suits:
- for rank in ranks:
- self.deck.append(Card(suit, rank))
-
- def __str__(self):
- deck_comp = ''
- for card in self.deck:
- deck_comp += '\n ' + card.__str__()
-
- def shuffle(self):
- random.shuffle(self.deck)
-
- def deal(self):
- single_card = self.deck.pop()
- return single_card
-
-
-class Hand:
-
- def __init__(self):
- self.cards = []
- self.value = 0
- self.aces = 0 # to keep track of aces
-
- def add_card(self, card):
- self.cards.append(card)
- self.value += values[card.rank]
- if card.rank == 'Ace':
- self.aces += 1
-
- def adjust_for_ace(self):
- while self.value > 21 and self.aces:
- self.value -= 10
- self.aces -= 1
-
-
-class Chips:
-
- def __init__(self):
- self.total = 100
- self.bet = 0
-
- def win_bet(self):
- self.total += self.bet
-
- def lose_bet(self):
- self.total -= self.bet
-
-
-def take_bet(chips):
- while True:
- try:
- chips.bet = int(input('How many chips would you like to bet? '))
- except ValueError:
- print('Your bet must be an integer! Try again.')
- else:
- if chips.bet > chips.total or chips.bet <= 0:
- print(
- "Your bet cannot exceed your balance and you have to enter a positive bet! Your current balance is: ",
- chips.total)
- else:
- break
-
-
-def hit(deck, hand):
- hand.add_card(deck.deal())
- hand.adjust_for_ace()
-
-
-def hit_or_stand(deck, hand):
- global playing
-
- while True:
- x = input("Would you like to Hit or Stand? Enter '1' or '0' ")
-
- if x.lower() == '1':
- hit(deck, hand)
-
- elif x.lower() == '0':
- print("You chose to stand. Dealer will hit.")
- playing = False
-
- else:
- print("Wrong input, please try again.")
- continue
- break
-
-
-def show_some(player, dealer):
- print("\nDealer's Hand:")
- print(" { hidden card }")
- print('', dealer.cards[1])
- print("\nYour Hand:", *player.cards, sep='\n ')
-
-
-def show_all(player, dealer):
- print("\nDealer's Hand:", *dealer.cards, sep='\n ')
- print("Dealer's Hand =", dealer.value)
- print("\nYour Hand:", *player.cards, sep='\n ')
- print("Your Hand =", player.value)
-
-
-def player_busts(player, dealer, chips):
- print("You are BUSTED !")
- chips.lose_bet()
-
-
-def player_wins(player, dealer, chips):
- print("You are the winner!")
- chips.win_bet()
-
-
-def dealer_busts(player, dealer, chips):
- print("Dealer has BUSTED !")
- chips.win_bet()
-
-
-def dealer_wins(player, dealer, chips):
- print("Dealer is the winner!")
- chips.lose_bet()
-
-
-def push(player, dealer):
- print("The match is tie !")
-
-
-# GAMEPLAY
-player_chips = Chips()
-
-while True:
-
- print("\t **********************************************************")
- print(
- "\t Welcome to the game Casino - BLACK JACK ! ")
- print("\t **********************************************************")
- print(Colour.BLACK + "\t ***************")
- print("\t * A *")
- print("\t * *")
- print("\t * * *")
- print("\t * *** *")
- print("\t * ***** *")
- print("\t * *** *")
- print("\t * * *")
- print("\t * *")
- print("\t * *")
- print("\t ***************" + Colour.END)
-
- print('\nRULES: Get as close to 21 as you can but if you get more than 21 you will lose!\n Aces count as 1 or 11.')
-
- deck = Deck()
- deck.shuffle()
-
- player_hand = Hand()
- player_hand.add_card(deck.deal())
- player_hand.add_card(deck.deal())
-
- dealer_hand = Hand()
- dealer_hand.add_card(deck.deal())
- dealer_hand.add_card(deck.deal())
-
-
- take_bet(player_chips)
-
- show_some(player_hand, dealer_hand)
-
- while playing:
-
- hit_or_stand(deck, player_hand)
- show_some(player_hand, dealer_hand)
-
- if player_hand.value > 21:
- player_busts(player_hand, dealer_hand, player_chips)
- break
-
- if player_hand.value <= 21:
-
- while dealer_hand.value < 17:
- hit(deck, dealer_hand)
-
- show_all(player_hand, dealer_hand)
-
- if dealer_hand.value > 21:
- dealer_busts(player_hand, dealer_hand, player_chips)
-
- elif dealer_hand.value > player_hand.value:
- dealer_wins(player_hand, dealer_hand, player_chips)
-
- elif dealer_hand.value < player_hand.value:
- player_wins(player_hand, dealer_hand, player_chips)
-
- else:
- push(player_hand, dealer_hand)
-
- print("\nYour current balance stands at", player_chips.total)
-
- if player_chips.total > 0:
- new_game = input("Would you like to play another hand? Enter '1' or '0' ")
- if new_game.lower() == '1':
- playing = True
- continue
- else:
- print(
- "Thanks for playing!\n" + Colour.GREEN + "\t$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n \t Congratulations! You won " + str(player_chips.total) + " coins!\n\t$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n " + Colour.END)
- break
- else:
- print(
- "Oops! You have bet all your chips and we are sorry you can't play more.\nThanks for playing! Do come again to Casino BLACK JACK!")
- break
diff --git a/Blender/README.md b/Blender/README.md
deleted file mode 100644
index 81030ac..0000000
--- a/Blender/README.md
+++ /dev/null
@@ -1,22 +0,0 @@
-## About
-Simple examples of Blender animations based on Python scripts.
-
-## How to
-Open in Blender: `blender --python the_script.py`
-
-Convert to GIF: `convert -delay 4 -loop 0 *.png animation.gif`
-
-Make a video: `ffmpeg -framerate 30 -f image2 -i '/tmp/%*.png' -c:v libx264 -profile:v high -crf 16 -pix_fmt yuv420p blender_render.mp4`
-
-## Scripts
-##### [trippy_tunnel.py](trippy_tunnel.py)
-
-
-##### [planes_rotation_x_axis.py](planes_rotation_x_axis.py)
-
-
-##### [planes_rotation_z_axis.py](planes_rotation_z_axis.py)
-
-
-##### [planes_rotations_xz.py](planes_rotations_xz.py)
-
\ No newline at end of file
diff --git a/Blender/images/trippy.gif b/Blender/images/trippy.gif
deleted file mode 100644
index bbd3550..0000000
Binary files a/Blender/images/trippy.gif and /dev/null differ
diff --git a/Blender/images/x_axis.gif b/Blender/images/x_axis.gif
deleted file mode 100644
index b819255..0000000
Binary files a/Blender/images/x_axis.gif and /dev/null differ
diff --git a/Blender/images/xz.gif b/Blender/images/xz.gif
deleted file mode 100644
index 4bc0af4..0000000
Binary files a/Blender/images/xz.gif and /dev/null differ
diff --git a/Blender/images/z_axis.gif b/Blender/images/z_axis.gif
deleted file mode 100644
index 5085c47..0000000
Binary files a/Blender/images/z_axis.gif and /dev/null differ
diff --git a/Blender/planes_rotation_x_axis.py b/Blender/planes_rotation_x_axis.py
deleted file mode 100644
index a608ca5..0000000
--- a/Blender/planes_rotation_x_axis.py
+++ /dev/null
@@ -1,34 +0,0 @@
-import os
-
-import bpy
-
-# load modules for IDE
-try:
- from utils import *
- from planes_utils import *
-except:
- pass
-
-# load modules dynamically for Blender
-directory = os.path.basename(bpy.data.filepath)
-files_names = ['utils.py', 'planes_utils.py']
-
-for file_name in files_names:
- file_path = os.path.join(directory, file_name)
- exec(compile(open(file_path).read(), file_path, 'exec'))
-
-max_x = 6
-max_y = 6
-plane_size = 2
-
-planes = init_basic_planes_scene(max_x, max_y, plane_size)
-
-# animate
-frame_begin = 0
-frame_end = 40
-bpy.context.scene.frame_end = frame_end
-
-for x in range(max_x):
- for y in range(max_y):
- plane = planes[x][y]
- add_rotation(plane, 'x', 180, frame_begin, frame_end)
diff --git a/Blender/planes_rotation_y_axis.py b/Blender/planes_rotation_y_axis.py
deleted file mode 100644
index aa0a2c5..0000000
--- a/Blender/planes_rotation_y_axis.py
+++ /dev/null
@@ -1,34 +0,0 @@
-import os
-
-import bpy
-
-# load modules for IDE
-try:
- from utils import *
- from planes_utils import *
-except:
- pass
-
-# load modules dynamically for Blender
-directory = os.path.basename(bpy.data.filepath)
-files_names = ['utils.py', 'planes_utils.py']
-
-for file_name in files_names:
- file_path = os.path.join(directory, file_name)
- exec(compile(open(file_path).read(), file_path, 'exec'))
-
-max_x = 6
-max_y = 6
-plane_size = 2
-
-planes = init_basic_planes_scene(max_x, max_y, plane_size)
-
-# animate
-frame_begin = 0
-frame_end = 40
-bpy.context.scene.frame_end = frame_end
-
-for x in range(max_x):
- for y in range(max_y):
- plane = planes[x][y]
- add_rotation(plane, 'y', 180, frame_begin, frame_end)
diff --git a/Blender/planes_rotation_z_axis.py b/Blender/planes_rotation_z_axis.py
deleted file mode 100644
index cbd6948..0000000
--- a/Blender/planes_rotation_z_axis.py
+++ /dev/null
@@ -1,35 +0,0 @@
-import os
-
-import bpy
-
-# load modules for IDE
-try:
- from utils import *
- from planes_utils import *
-except:
- pass
-
-# load modules dynamically for Blender
-directory = os.path.basename(bpy.data.filepath)
-files_names = ['utils.py', 'planes_utils.py']
-
-for file_name in files_names:
- file_path = os.path.join(directory, file_name)
- exec(compile(open(file_path).read(), file_path, 'exec'))
-
-max_x = 6
-max_y = 6
-plane_size = 2
-
-planes = init_basic_planes_scene(max_x, max_y, plane_size)
-
-# animate
-frame_begin = 0
-frame_end = 20
-bpy.context.scene.frame_end = frame_end
-
-i = 0
-for x in range(max_x):
- for y in range(max_y):
- plane = planes[x][y]
- add_rotation(plane, 'z', 90, frame_begin, frame_end)
diff --git a/Blender/planes_rotations_xz.py b/Blender/planes_rotations_xz.py
deleted file mode 100644
index 63f89ac..0000000
--- a/Blender/planes_rotations_xz.py
+++ /dev/null
@@ -1,35 +0,0 @@
-import os
-
-import bpy
-
-# load modules for IDE
-try:
- from utils import *
- from planes_utils import *
-except:
- pass
-
-# load modules dynamically for Blender
-directory = os.path.basename(bpy.data.filepath)
-files_names = ['utils.py', 'planes_utils.py']
-
-for file_name in files_names:
- file_path = os.path.join(directory, file_name)
- exec(compile(open(file_path).read(), file_path, 'exec'))
-
-max_x = 6
-max_y = 6
-plane_size = 2
-
-planes = init_basic_planes_scene(max_x, max_y, plane_size)
-
-# animate
-frame_begin = 0
-frame_end = 40
-bpy.context.scene.frame_end = frame_end
-
-for x in range(max_x):
- for y in range(max_y):
- plane = planes[x][y]
- add_rotation(plane, 'x', 180, frame_begin, frame_end)
- add_rotation(plane, 'z', 180, frame_begin, frame_end)
diff --git a/Blender/planes_utils.py b/Blender/planes_utils.py
deleted file mode 100644
index e8e27cf..0000000
--- a/Blender/planes_utils.py
+++ /dev/null
@@ -1,64 +0,0 @@
-import bpy
-
-# load modules for IDE
-try:
- from utils import *
-except:
- pass
-
-
-def create_planes(max_x, max_y, plane_size):
- # create planes
- for x in range(max_x):
- for y in range(max_y):
- bpy.ops.mesh.primitive_plane_add(location=(x * plane_size, y * plane_size, 0))
-
- # 2 dimensional array
- planes = [[0 for x in range(max_y)] for y in range(max_x)]
-
- # put my planes in the array
- for obj in bpy.data.objects:
- x = int(obj.location.x / plane_size)
- y = int(obj.location.y / plane_size)
- planes[x][y] = obj
-
- return planes
-
-
-def init_basic_planes_scene(max_x, max_y, plane_size, cam_distance=None):
- clear_scene()
- set_render_resolution((max_x - 2) * 100, (max_y - 2) * 100)
-
- planes = create_planes(max_x, max_y, plane_size)
-
- material = make_red()
- for x in range(max_x):
- for y in range(max_y):
- plane = planes[x][y]
- set_material(plane, material)
-
- # create camera
- cam_x = max_x - plane_size / 2
- cam_y = max_y - plane_size / 2
- if cam_distance is None:
- cam_z = -((max_x + 2) * 2)
- else:
- cam_z = -cam_distance
-
- # position the camera so (0, 0) is in the top left corner
- cam_rotation = (0, math.radians(180), math.radians(180))
- bpy.ops.object.camera_add(location=(cam_x, cam_y, cam_z), rotation=cam_rotation)
-
- # one light in the middle of each side of the rectangle, at the same distance
- distance_from_planes = 40
- locations = []
- locations.append((-distance_from_planes, max_y * plane_size / 2))
- locations.append((max_x * plane_size / 2, -distance_from_planes))
- locations.append((max_x * plane_size + distance_from_planes, max_y * plane_size / 2))
- locations.append((max_x * plane_size / 2, max_y * plane_size + distance_from_planes))
-
- light_z = -40
- for location in locations:
- bpy.ops.object.lamp_add(type='AREA', location=(location[0], location[1], light_z), rotation=cam_rotation)
-
- return planes
diff --git a/Blender/trippy_tunnel.py b/Blender/trippy_tunnel.py
deleted file mode 100644
index bd48ddd..0000000
--- a/Blender/trippy_tunnel.py
+++ /dev/null
@@ -1,248 +0,0 @@
-import math
-import os
-import random
-
-import bpy
-
-# load modules for IDE
-try:
- from utils import *
- from planes_utils import *
-except:
- pass
-
-# load modules dynamically for Blender
-directory = os.path.basename(bpy.data.filepath)
-files_names = ['utils.py', 'planes_utils.py']
-
-for file_name in files_names:
- file_path = os.path.join(directory, file_name)
- exec(compile(open(file_path).read(), file_path, 'exec'))
-
-# parameters
-distance = 10
-torus_size = 1
-torus_count = 50
-frame_length = 10
-light_distance = 9
-angle_limit_max = 20
-angle_limit_min = -1 * angle_limit_max
-
-
-def animate_in_circle(obj, begin, end, radius, direction):
- length = end - begin + 1
- for i in range(begin, end):
- degree = (i - begin) * (360 / length)
- if i % 5 == 0:
- insert_location_keyframe(obj, i)
- insert_rotation_keyframe(obj, i)
-
- x, y = get_polar_coordinates(radius, math.radians(degree))
- obj.location[0] = x * 1.5
- obj.location[2] = direction * y * 1.5
-
- insert_location_keyframe(obj, i + 10)
- insert_rotation_keyframe(obj, i + 10)
-
-
-clear_scene()
-
-# world settings
-W = bpy.context.scene.world
-W.horizon_color = (0, 0, 0)
-W.light_settings.use_environment_light = True
-W.light_settings.environment_energy = 0.1
-
-# create camera
-bpy.ops.object.camera_add(location=(0, -5, 0), rotation=(math.radians(90), 0, 0))
-for obj in get_objects('Camera'):
- camera = obj
-
-# create torus and put them in array
-for i in range(0, torus_count):
- bpy.ops.mesh.primitive_torus_add(location=(0, 0, 0))
-
-tunnel_torus = []
-
-i = 0
-for obj in get_objects('Torus'):
- tunnel_torus.append(obj)
- obj.name = 'myTorus_' + str(i)
- i += 1
-
-# create materials
-colors = []
-colors.append(make_material('C1', (51 / 256, 145 / 256, 148 / 256), (1, 1, 1), 1))
-colors.append(make_material('C2', (251 / 256, 107 / 256, 65 / 256), (1, 1, 1), 1))
-colors.append(make_material('C3', (246 / 256, 216 / 256, 107 / 256), (1, 1, 1), 1))
-
-# rotate torus by 90, change scale and assign color
-count = 0
-
-for torus in tunnel_torus:
- torus.rotation_euler[0] = math.radians(90)
- torus.scale = (torus_size, torus_size, torus_size * 2)
-
- set_material(torus, colors[count])
- if count < len(colors) - 1:
- count += 1
- else:
- count = 0
-
-# place tunnel torus
-pos_x = 0
-pos_y = 0
-pos_z = 0
-angle1 = 0
-angle2 = 0
-sign1 = 1
-sign2 = 1
-
-for torus in tunnel_torus:
- delta1 = random.randint(3, 6) * sign1
- delta2 = random.randint(3, 6) * sign2
- angle1 += delta1
- angle2 += delta2
-
- torus.rotation_euler[1] = math.radians(angle1)
- torus.rotation_euler[2] = math.radians(angle2)
-
- torus.location[0] = pos_x - distance * math.sin(math.radians(delta1))
- torus.location[1] = pos_y + distance * math.cos(math.radians(delta1))
- torus.location[2] = pos_z + torus_size * math.sin(math.radians(delta2))
-
- pos_x = torus.location[0]
- pos_y = torus.location[1]
- pos_z = torus.location[2]
-
- # change sign randomly
- if random.randint(0, 10) == 0:
- sign1 *= -1
-
- if random.randint(0, 10) == 0:
- sign2 *= -1
-
- # sometimes, create a big delta
- if random.randint(0, 30) == 0:
- delta1 = random.randint(7, 10) * sign1
-
- if random.randint(0, 30) == 0:
- delta1 = random.randint(7, 10) * sign1
-
- # limit angle variation
- if angle1 >= angle_limit_max:
- sign1 = -1
- if angle1 <= angle_limit_min:
- sign1 = 1
-
- if angle2 >= angle_limit_max:
- sign2 = -1
- if angle2 <= angle_limit_min:
- sign2 = 1
-
-# bigger wire torus
-material = make_material('C4', (255 / 256, 45 / 256, 48 / 256), (1, 1, 1), 1)
-material.type = 'HALO'
-material.alpha = 0.2
-
-big_torus_rate = 3
-
-for i in range(0, int(math.floor(torus_count / big_torus_rate))):
- bpy.ops.mesh.primitive_torus_add(location=(0, 0, 0))
-
-big_torus = []
-
-i = 0
-for obj in get_objects('Torus'):
- big_torus.append(obj)
- obj.name = 'bigTorus_' + str(i)
- set_material(obj, material)
- i += 1
-
-count = 0
-for torus in big_torus:
- model = tunnel_torus[count * big_torus_rate]
- torus.scale = (torus_size * 5, torus_size * 5, torus_size * 5)
- torus.location = model.location
- torus.rotation_euler = model.rotation_euler
- count += 1
-
-# create lights
-light_counts = 0
-for torus in tunnel_torus:
- if light_counts % 3 == 0:
- bpy.ops.object.lamp_add(type='POINT', location=(0, torus.location[1], light_distance))
-
- light_counts += 1
-
-# place lights in array and change settings
-lights = []
-for obj in get_objects('Point'):
- lights.append(obj)
- obj.data.energy = 15
- obj.data.shadow_method = 'RAY_SHADOW'
-
-# init camera animation
-insert_location_keyframe(camera, 0)
-insert_rotation_keyframe(camera, 0)
-
-bpy.context.scene.frame_current = 0
-bpy.context.scene.frame_end = frame_length * torus_count
-
-# animate camera (synchronize position and rotation with tunnel)
-frame_count = 0
-count = 2
-for torus in tunnel_torus:
- camera.location = torus.location
- camera.rotation_euler = torus.rotation_euler
-
- insert_location_keyframe(camera, frame_count)
- insert_rotation_keyframe(camera, frame_count)
-
- frame_count += frame_length
-
-# animate torus scale
-shift = 2
-frame_count = 0
-final_scale = torus_size * 2.5
-for i in range(shift, len(tunnel_torus)):
- insert_scale_keyframe(tunnel_torus[i], frame_count)
-
- tunnel_torus[i].scale = (final_scale, final_scale, final_scale)
-
- # they scale up on their different axis at different time, this creates some kind of "rubbery" effect
- for idx in [0, 1, 2]:
- frame = frame_count + frame_length * random.randint(1, 4) / 3
- insert_scale_keyframe(tunnel_torus[i], frame, indexes=[idx])
-
- frame_count += frame_length
-
-# animate big torus rotation
-sign = 1
-frame_count = 0
-for torus in big_torus:
- sign = sign * -1
- frame_count = 0
- while frame_count <= frame_length * torus_count:
- insert_rotation_keyframe(torus, frame_count, indexes=[1])
- torus.rotation_euler[1] += sign * math.radians(15)
- insert_rotation_keyframe(torus, frame_count + frame_length, indexes=[1])
- frame_count += frame_length
-
-# animate lights
-nbr_tours = 15
-tour_length = (frame_length * torus_count) / nbr_tours
-count = 0
-
-for light in lights:
- count += 1
- if count % 2 == 0:
- direction = 1
- else:
- direction = -1
-
- for i in range(nbr_tours):
- begin_anim = i * int(tour_length)
- end_anim = (i + 1) * int(tour_length)
-
- animate_in_circle(light, begin_anim, end_anim, light_distance, direction)
diff --git a/Blender/utils.py b/Blender/utils.py
deleted file mode 100644
index 4a52811..0000000
--- a/Blender/utils.py
+++ /dev/null
@@ -1,88 +0,0 @@
-import math
-
-import bpy
-
-
-def set_render_resolution(x, y):
- bpy.data.scenes[0].render.resolution_x = x * 2
- bpy.data.scenes[0].render.resolution_y = y * 2
-
-
-# found on http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Cookbook/Code_snippets/Materials_and_textures
-def make_material(name, diffuse, specular, alpha):
- mat = bpy.data.materials.new(name)
- mat.diffuse_color = diffuse
- mat.diffuse_shader = 'LAMBERT'
- mat.diffuse_intensity = 1.0
- mat.specular_color = specular
- mat.specular_shader = 'COOKTORR'
- mat.specular_intensity = 0.5
- mat.alpha = alpha
- mat.ambient = 1
- return mat
-
-
-def make_red():
- return make_material('Red', (1, 0, 0), (1, 1, 1), 1)
-
-
-def make_blue():
- return make_material('BlueSemi', (0, 0, 1), (0.5, 0.5, 0), 0.5)
-
-
-def set_material(obj, mat):
- if obj.data.materials:
- # assign to 1st material slot
- obj.data.materials[0] = mat
- else:
- # no slots
- obj.data.materials.append(mat)
-
-
-def get_objects(prefix):
- result = []
- for o in bpy.data.objects:
- if o.name.startswith(prefix):
- result.append(o)
-
- return result
-
-
-# clear all existing objects (Cube, Lamp, Camera)
-def clear_scene():
- bpy.ops.object.select_all(action='DESELECT')
- for obj in bpy.context.scene.objects:
- obj.select = True
-
- bpy.ops.object.delete()
-
-
-def _insert_keyframe(obj, data_path, frame, indexes):
- if indexes is None:
- indexes = [0, 1, 2]
-
- for i in indexes:
- obj.keyframe_insert(data_path, index=i, frame=frame)
-
-
-def insert_location_keyframe(obj, frame, indexes=None):
- _insert_keyframe(obj, 'location', frame, indexes)
-
-
-def insert_rotation_keyframe(obj, frame, indexes=None):
- _insert_keyframe(obj, 'rotation_euler', frame, indexes)
-
-
-def insert_scale_keyframe(obj, frame, indexes=None):
- _insert_keyframe(obj, 'scale', frame, indexes)
-
-
-def add_rotation(obj, axis, angle, frame_begin, frame_end):
- axis_int = ['x', 'y', 'z'].index(axis)
- obj.keyframe_insert('rotation_euler', index=axis_int, frame=frame_begin)
- obj.rotation_euler[axis_int] = math.radians(angle)
- obj.keyframe_insert('rotation_euler', index=axis_int, frame=frame_end)
-
-
-def get_polar_coordinates(radius, angle):
- return radius * math.cos(angle), radius * math.sin(angle)
diff --git a/Book Library/.vscode/settings.json b/Book Library/.vscode/settings.json
new file mode 100644
index 0000000..da122ea
--- /dev/null
+++ b/Book Library/.vscode/settings.json
@@ -0,0 +1,12 @@
+{
+ "vscode-corda.isCordaProject": false,
+ "python.testing.unittestArgs": [
+ "-v",
+ "-s",
+ "./app",
+ "-p",
+ "*test*.py"
+ ],
+ "python.testing.pytestEnabled": false,
+ "python.testing.unittestEnabled": true
+}
\ No newline at end of file
diff --git a/Book Library/Procfile b/Book Library/Procfile
new file mode 100644
index 0000000..80a980e
--- /dev/null
+++ b/Book Library/Procfile
@@ -0,0 +1 @@
+web: gunicorn run:app
\ No newline at end of file
diff --git a/Book Library/README.md b/Book Library/README.md
new file mode 100644
index 0000000..06c2dc1
--- /dev/null
+++ b/Book Library/README.md
@@ -0,0 +1,23 @@
+## AUTHOR
+[Tomasz Modrzejewski](https://github.com/TomaszModrzejewski)
+
+## DESCRIPTION
+This is a a books web application that uses the flask python framework and
+the google-books-api to display different library of books.
+
+## LIVE SITE
+
+
+## TECHNOLOGY USED
+1. Flask Framework
+1. HTML
+1. CSS
+1. Heroku
+1. Google-Books-Api
+
+## CONTACT INFROMATION
+For any concern about the application you can contact me through (goh15@wp.pl))
+
+## LICENSE
+* MIT License
+* Copyright (c) 2021 Tomasz Modrzejewski
\ No newline at end of file
diff --git a/Book Library/__pycache__/pytest.cpython-39.pyc b/Book Library/__pycache__/pytest.cpython-39.pyc
new file mode 100644
index 0000000..e2812a5
Binary files /dev/null and b/Book Library/__pycache__/pytest.cpython-39.pyc differ
diff --git a/Book Library/app/__init__.py b/Book Library/app/__init__.py
new file mode 100644
index 0000000..8393f01
--- /dev/null
+++ b/Book Library/app/__init__.py
@@ -0,0 +1,6 @@
+from flask import Flask
+
+# Initializing application
+app = Flask(__name__)
+
+from app import views
\ No newline at end of file
diff --git a/Book Library/app/__pycache__/__init__.cpython-39.pyc b/Book Library/app/__pycache__/__init__.cpython-39.pyc
new file mode 100644
index 0000000..2ecb337
Binary files /dev/null and b/Book Library/app/__pycache__/__init__.cpython-39.pyc differ
diff --git a/Book Library/app/__pycache__/views.cpython-39.pyc b/Book Library/app/__pycache__/views.cpython-39.pyc
new file mode 100644
index 0000000..f92c962
Binary files /dev/null and b/Book Library/app/__pycache__/views.cpython-39.pyc differ
diff --git a/Book Library/app/models/__init__.py b/Book Library/app/models/__init__.py
new file mode 100644
index 0000000..7766c6e
--- /dev/null
+++ b/Book Library/app/models/__init__.py
@@ -0,0 +1,2 @@
+from .books import Books
+from .https import convert_to_https
\ No newline at end of file
diff --git a/Book Library/app/models/__pycache__/__init__.cpython-39.pyc b/Book Library/app/models/__pycache__/__init__.cpython-39.pyc
new file mode 100644
index 0000000..2dfc750
Binary files /dev/null and b/Book Library/app/models/__pycache__/__init__.cpython-39.pyc differ
diff --git a/Book Library/app/models/__pycache__/books.cpython-39.pyc b/Book Library/app/models/__pycache__/books.cpython-39.pyc
new file mode 100644
index 0000000..7876b24
Binary files /dev/null and b/Book Library/app/models/__pycache__/books.cpython-39.pyc differ
diff --git a/Book Library/app/models/__pycache__/https.cpython-39.pyc b/Book Library/app/models/__pycache__/https.cpython-39.pyc
new file mode 100644
index 0000000..4d442d9
Binary files /dev/null and b/Book Library/app/models/__pycache__/https.cpython-39.pyc differ
diff --git a/Book Library/app/models/__pycache__/search.cpython-39.pyc b/Book Library/app/models/__pycache__/search.cpython-39.pyc
new file mode 100644
index 0000000..317decb
Binary files /dev/null and b/Book Library/app/models/__pycache__/search.cpython-39.pyc differ
diff --git a/Book Library/app/models/books.py b/Book Library/app/models/books.py
new file mode 100644
index 0000000..cde2922
--- /dev/null
+++ b/Book Library/app/models/books.py
@@ -0,0 +1,67 @@
+from .search import google_book_search
+from .https import convert_to_https
+
+
+class Books():
+ def __init__(self, query="", start=0, testing=False, https=False):
+ self.json = google_book_search(query, start) if not testing else testing
+ self.https = bool(https)
+
+ def parse(self):
+ """
+ Takes the google books api and displays the results to the screen and returns
+ an empty payload if there is an error
+ """
+
+ if self.json["status"] != 200:
+ return empty_payload()
+
+ body = self.json["body"]
+ book_list = []
+
+ try:
+ for i in body["items"]:
+ book = {}
+
+ # checks the API responses for an existing data - and
+ # adds an empty string if no data is returned from the API
+ for field in ["authors", "title", "publisher", "imageLinks", "infoLink"]:
+ try:
+ book[field] = i["volumeInfo"][field]
+ except KeyError:
+ book[field] = ""
+
+ book["authors"] = self._parse_authors(book["authors"])
+ book["imageLinks"] = self._parse_thumbnail(book["imageLinks"])
+ book_list.append(book)
+
+ except KeyError:
+ return empty_payload()
+
+ return {"total": body["totalItems"], "items": book_list}
+
+ def _parse_authors(self, authors_list=""):
+ """
+ Joins array of authors into comma-separated string
+ """
+ return ", ".join(authors_list)
+
+ def _parse_thumbnail(self, imageLinks=""):
+ """
+ Adding own image if there is no image for book covers
+ """
+ if not imageLinks:
+ return {"thumbnail": "static/images/booky-book.jpg"}
+ if self.https:
+ for link in imageLinks:
+ imageLinks[link] = convert_to_https(imageLinks[link])
+
+ return imageLinks
+
+
+def payload(items, total):
+ return {"total": total, "items": items}
+
+
+def empty_payload():
+ return payload([], 0)
diff --git a/Book Library/app/models/https.py b/Book Library/app/models/https.py
new file mode 100644
index 0000000..cc1e7aa
--- /dev/null
+++ b/Book Library/app/models/https.py
@@ -0,0 +1,5 @@
+def convert_to_https(url):
+ """
+ Replace the first instance of http:// in a string with https://
+ """
+ return url.replace("http://", "https://", 1)
diff --git a/Book Library/app/models/search.py b/Book Library/app/models/search.py
new file mode 100644
index 0000000..2bea927
--- /dev/null
+++ b/Book Library/app/models/search.py
@@ -0,0 +1,12 @@
+import requests
+
+def google_book_search(search, startIndex=0, maxResults=20):
+ """
+ searching the google books api to return a json response
+ """
+ params = {"q": search, "startIndex":startIndex, "maxResults":maxResults}
+ r = requests.get("https://www.googleapis.com/books/v1/volumes", params=params)
+
+ return {"status":r.status_code, "body":r.json()}
+
+
diff --git a/Book Library/app/static/css/index.css b/Book Library/app/static/css/index.css
new file mode 100644
index 0000000..30c773b
--- /dev/null
+++ b/Book Library/app/static/css/index.css
@@ -0,0 +1,169 @@
+.navbar {
+ background-color: #ffff;
+ border-bottom: 1px solid grey;
+}
+.navbar-brand {
+ color: black;
+ font-size: 28px;
+ font-family: "Times New Roman", Times, serif;
+ margin-right: 5rem;
+}
+.navbar-brand:hover {
+ color: black;
+}
+.navbar-brand img {
+ width: 70px;
+ height: 70px;
+ object-fit: cover;
+}
+.navbar li a {
+ color: black;
+ font-size: 16px;
+}
+.navbar .search-form {
+ margin-left: 3rem;
+}
+.background {
+ background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
+ url("../images/booky-background.jpg");
+ background-repeat: no-repeat;
+ background-size: cover;
+ background-position: center;
+ height: 100vh;
+ overflow-x: hidden;
+}
+.background .booky {
+ text-align: center;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+}
+.background .booky h1,
+p,
+a {
+ display: block;
+}
+.background p {
+ font-size: 42px;
+ color: white;
+ font-weight: 500;
+ font-family: "Times New Roman", Times, serif;
+ letter-spacing: normal;
+}
+.background button:hover {
+ background-color: rgba(222, 223, 240, 0.8);
+}
+.book-library {
+ display: inline-grid;
+ grid-template-columns: repeat(3, 1fr);
+ grid-auto-rows: auto;
+ grid-gap: 10px;
+ margin-top: 8rem;
+}
+.book-library a {
+ text-decoration: none;
+}
+.book-library h3 {
+ font-size: 17px;
+ font-family: "Times New Roman", Times, serif;
+ font-weight: bold;
+ color: black;
+ width: 200px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ line-height: 15px;
+}
+.book-library p {
+ font-size: 13px;
+ color: black;
+}
+.book-library .card {
+ max-width: 100%;
+ max-height: 100vh;
+ line-height: 10px;
+ background-color: rgba(202, 217, 228, 0.3);
+}
+.book-library .card img {
+ width: 100%;
+ height: 200px;
+ object-fit: cover;
+}
+.footer-controls {
+ display: flex;
+ justify-content: center;
+ margin-top: 2rem;
+ margin-bottom: 3rem;
+}
+.footer-controls button {
+ width: 100px;
+ height: 40px;
+ font-size: 14px;
+ border-radius: 10px;
+ border: none;
+ outline: none;
+ background-color: rgba(202, 217, 228, 0.3);
+ margin: 5px;
+}
+.footer-controls button:hover {
+ background-color: rgba(0, 0, 0, 0.3);
+ color: white;
+ transition: 0.3s ease;
+}
+/* smaller phones media query */
+@media screen and (min-device-width: 280px) and (max-device-width: 653px) {
+ .body {
+ width: 100vw;
+ overflow-x: hidden;
+ }
+ .book-library {
+ display: inline-grid;
+ grid-template-columns: repeat(1, 1fr);
+ grid-auto-rows: auto;
+ grid-gap: 2rem;
+ margin-top: 8rem;
+ }
+}
+/* small phones media query */
+@media screen and (min-device-width: 320px) and (max-device-width: 640px) {
+ .body {
+ width: 100vw;
+ overflow-x: hidden;
+ }
+ .book-library {
+ display: inline-grid;
+ grid-template-columns: repeat(1, 1fr);
+ grid-auto-rows: auto;
+ grid-gap: 2rem;
+ margin-top: 8rem;
+ }
+}
+/*iphones media query */
+@media only screen and (min-device-width: 375px) and (max-device-width: 812px) {
+ body {
+ width: 100vw;
+ overflow-x: hidden;
+ }
+ .book-library {
+ display: inline-grid;
+ grid-template-columns: repeat(1, 1fr);
+ grid-auto-rows: auto;
+ grid-gap: 2rem;
+ margin-top: 8rem;
+ }
+}
+/* ipad media query */
+@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
+ .body {
+ width: 100vw;
+ overflow-x: hidden;
+ }
+ .book-library {
+ display: inline-grid;
+ grid-template-columns: repeat(2, 1fr);
+ grid-auto-rows: auto;
+ grid-gap: 2rem;
+ margin-top: 8rem;
+ }
+}
diff --git a/Book Library/app/static/images/booky (1).png b/Book Library/app/static/images/booky (1).png
new file mode 100644
index 0000000..ab6d0cc
Binary files /dev/null and b/Book Library/app/static/images/booky (1).png differ
diff --git a/Book Library/app/static/images/booky-background.jpg b/Book Library/app/static/images/booky-background.jpg
new file mode 100644
index 0000000..a8ed0d0
Binary files /dev/null and b/Book Library/app/static/images/booky-background.jpg differ
diff --git a/Book Library/app/static/images/booky-book.jpg b/Book Library/app/static/images/booky-book.jpg
new file mode 100644
index 0000000..b9fc554
Binary files /dev/null and b/Book Library/app/static/images/booky-book.jpg differ
diff --git a/Book Library/app/static/images/favicon.png b/Book Library/app/static/images/favicon.png
new file mode 100644
index 0000000..3c661c7
Binary files /dev/null and b/Book Library/app/static/images/favicon.png differ
diff --git a/Book Library/app/templates/base.html b/Book Library/app/templates/base.html
new file mode 100644
index 0000000..b814e45
--- /dev/null
+++ b/Book Library/app/templates/base.html
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+ Booky
+
+
+
+
+
+
+
+ {% include 'navbar.html' %}
+ {% block content %}{% endblock %}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Book Library/app/templates/index.html b/Book Library/app/templates/index.html
new file mode 100644
index 0000000..3faa870
--- /dev/null
+++ b/Book Library/app/templates/index.html
@@ -0,0 +1,9 @@
+{% extends "base.html" %}
+
+{% block content %}
+
+
+
Making Books Available to Everyone.
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/Book Library/app/templates/navbar.html b/Book Library/app/templates/navbar.html
new file mode 100644
index 0000000..91129a9
--- /dev/null
+++ b/Book Library/app/templates/navbar.html
@@ -0,0 +1,23 @@
+
\ No newline at end of file
diff --git a/Book Library/app/templates/search.html b/Book Library/app/templates/search.html
new file mode 100644
index 0000000..b9879ed
--- /dev/null
+++ b/Book Library/app/templates/search.html
@@ -0,0 +1,52 @@
+{% extends "base.html" %}
+
+
+{% block content %}
+
+
+ {% for book in data["items"] %}
+
+
+ {% endfor %}
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/Book Library/app/views.py b/Book Library/app/views.py
new file mode 100644
index 0000000..8bf8d2b
--- /dev/null
+++ b/Book Library/app/views.py
@@ -0,0 +1,41 @@
+from flask import Flask, render_template, request, redirect, url_for
+from .models import Books, convert_to_https
+from app import app
+
+# Views
+
+
+@app.route('/')
+def index():
+ """
+ View root page function that returns the index page and its data
+ """
+ return render_template("index.html")
+
+
+@app.route('/query')
+def query():
+ """Display search requests and pagination via GET"""
+ if not request.args.get("search"):
+ return redirect(url_for("index"))
+
+ if request.args.get("start") is None or int(request.args.get("start")) < 0:
+ start = 0
+ else:
+ start = int(request.args.get("start"))
+
+ query = request.args.get('search')
+ https = True if app.env != "development" else False
+ book_list_parsed = Books(query, start, https=https).parse()
+
+ if len(book_list_parsed["items"]) > 0:
+ return render_template("search.html", start=start+1, count=start + len(book_list_parsed["items"]), search=query, data=book_list_parsed)
+ else:
+ return redirect(url_for("index"))
+
+ @app.errorhandler(404)
+ def page_not_found(error):
+ """Return 404 for incorrect HTTP queries"""
+ return "404 - Page Not Found!", 404
+
+ return app
diff --git a/Book Library/config.py b/Book Library/config.py
new file mode 100644
index 0000000..8308d94
--- /dev/null
+++ b/Book Library/config.py
@@ -0,0 +1,25 @@
+class Config:
+ '''
+ General configuration parent class
+ '''
+ pass
+
+class ProdConfig(Config):
+ '''
+ Production configuration child class
+
+ Args:
+ Config: The parent configuration class with General configuration settings
+ '''
+ pass
+
+
+class DevConfig(Config):
+ '''
+ Development configuration child class
+
+ Args:
+ Config: The parent configuration class with General configuration settings
+ '''
+
+ DEBUG = True
diff --git a/Checkers/__init__.py b/Book Library/instance/config.py
similarity index 100%
rename from Checkers/__init__.py
rename to Book Library/instance/config.py
diff --git a/Book Library/requirements.txt b/Book Library/requirements.txt
new file mode 100644
index 0000000..de19aa7
--- /dev/null
+++ b/Book Library/requirements.txt
@@ -0,0 +1,26 @@
+astroid==2.4.2
+autopep8==1.5.4
+certifi==2020.6.20
+chardet==3.0.4
+click==7.1.2
+dominate==2.5.2
+Flask==1.1.2
+Flask-Bootstrap==3.3.7.1
+gunicorn==20.0.4
+idna==2.10
+isort==5.6.4
+itsdangerous==1.1.0
+Jinja2==2.11.2
+lazy-object-proxy==1.4.3
+MarkupSafe==1.1.1
+mccabe==0.6.1
+pycodestyle==2.6.0
+pylint==2.6.0
+requests==2.24.0
+six==1.15.0
+toml==0.10.1
+typed-ast==1.4.1
+urllib3==1.25.10
+visitor==0.1.3
+Werkzeug==1.0.1
+wrapt==1.12.1
diff --git a/Book Library/run.py b/Book Library/run.py
new file mode 100644
index 0000000..e63a56c
--- /dev/null
+++ b/Book Library/run.py
@@ -0,0 +1,4 @@
+from app import app
+
+if __name__ == '__main__':
+ app.run(debug = True)
\ No newline at end of file
diff --git a/Book Library/test/test_app.py b/Book Library/test/test_app.py
new file mode 100644
index 0000000..cf158c5
--- /dev/null
+++ b/Book Library/test/test_app.py
@@ -0,0 +1,7 @@
+from flask import Flask
+
+
+def test_app(app):
+ assert isinstance(app, Flask)
+ assert app.config['TESTING'] is True
+ assert app.config['DEBUG'] is True
diff --git a/Book Library/virtual/lib64 b/Book Library/virtual/lib64
new file mode 100644
index 0000000..7951405
--- /dev/null
+++ b/Book Library/virtual/lib64
@@ -0,0 +1 @@
+lib
\ No newline at end of file
diff --git a/Book Library/virtual/pyvenv.cfg b/Book Library/virtual/pyvenv.cfg
new file mode 100644
index 0000000..d411f1c
--- /dev/null
+++ b/Book Library/virtual/pyvenv.cfg
@@ -0,0 +1,3 @@
+home = /usr/bin
+include-system-site-packages = false
+version = 3.6.9
diff --git a/CRC.py b/CRC.py
deleted file mode 100644
index baba85f..0000000
--- a/CRC.py
+++ /dev/null
@@ -1,51 +0,0 @@
-def crc_check(data, div):
- l = len(div)
- ct = 0
- data = [int(i) for i in data]
- div = [int(i) for i in div]
- zero = [0 for i in range(l)]
- temp_data = [data[i] for i in range(l)]
- result = []
- for j in range(len(data) - len(div) + 1):
- print("Temp_dividend", temp_data)
- msb = temp_data[0]
- if msb == 0:
- result.append(0)
- for i in range(l - 1, -1, -1):
- temp_data[i] = temp_data[i] ^ zero[i]
- else:
- result.append(1)
- for i in range(l - 1, -1, -1):
- temp_data[i] = temp_data[i] ^ div[i]
- temp_data.pop(0)
- if (l + j < len(data)):
- temp_data.append(data[l + j])
- crc = temp_data
- print("Quotient: ", result, "remainder", crc)
- return crc
-# returning crc value
-
-
-while 1 > 0:
- print("Enter data: ")
- data = input() #can use it like int(input())
- print("Enter divisor")
- div = input() #can use it like int(input())
- original_data = data
- data = data + ("0" * (len(div) - 1))
- crc = crc_check(data, div)
- crc_str = ""
- for c in crc:
- crc_str += c
- print("Sent data: ", original_data + crc_str)
- sent_data = original_data + crc_str
- print("If again applying CRC algorithm, the remainder/CRC must be zero if errorless.")
- crc = crc_check(sent_data, div)
- remainder = crc
- print("Receiver side remainder: ", remainder)
- print("Continue [Y/N]:")
- ch = input()
- if ch == 'N' or ch == 'n':
- break
- else:
- continue
diff --git a/Checkers/.vscode/settings.json b/Checkers/.vscode/settings.json
deleted file mode 100644
index 5c00f7e..0000000
--- a/Checkers/.vscode/settings.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "vscode-corda.isCordaProject": false
-}
\ No newline at end of file
diff --git a/Checkers/assets/crown.png b/Checkers/assets/crown.png
deleted file mode 100644
index 94f6efd..0000000
Binary files a/Checkers/assets/crown.png and /dev/null differ
diff --git a/Checkers/first.py b/Checkers/first.py
deleted file mode 100644
index 2ded41c..0000000
--- a/Checkers/first.py
+++ /dev/null
@@ -1,59 +0,0 @@
-'''
-Author : Tomasz Modrzejewski
-
-'''
-
-# import libraries
-import pygame as pg
-from modules import statics as st
-from modules.statics import *
-from modules.checker_board import *
-from modules.checker import *
-
-# static variables for this perticular file
-fps = 60
-
-WIN = pg.display.set_mode((st.width, st.height))
-pg.display.set_caption("Checkers")
-
-# get row and col for mouse
-def get_row_col_mouse (pos):
- x, y = pos
- row = y // sq_size
- col = x // sq_size
- return row, col
-
-# main function
-if __name__ == '__main__':
-
- # represents the game
- run = True
-
- # certain clock value default because it is varries from diff pc to pc
- clock = pg.time.Clock()
-
- # create board
- board = checker_board()
- game = checker(WIN)
-
- # main loop
- while (run):
- clock.tick(fps)
-
- if (board.winner() != None):
- print(board.winner())
-
- # check if any events is running or not
- for event in pg.event.get():
- if (event.type == pg.QUIT):
- run = False
-
- if (event.type == pg.MOUSEBUTTONDOWN):
- pos = pg.mouse.get_pos()
- row, col = get_row_col_mouse(pos)
- game.selectrc(row, col)
- #piece = board.get_piece(row, col)
- #board.move(piece, 4, 3)
-
- game.update()
- pg.quit()
\ No newline at end of file
diff --git a/Checkers/modules/__init__.py b/Checkers/modules/__init__.py
deleted file mode 100644
index d5b9eb6..0000000
--- a/Checkers/modules/__init__.py
+++ /dev/null
@@ -1,4 +0,0 @@
-'''
-Auhtor : Tomasz Modrzejewski
-
-'''
diff --git a/Checkers/modules/__pycache__/__init__.cpython-39.pyc b/Checkers/modules/__pycache__/__init__.cpython-39.pyc
deleted file mode 100644
index ac5ca3b..0000000
Binary files a/Checkers/modules/__pycache__/__init__.cpython-39.pyc and /dev/null differ
diff --git a/Checkers/modules/__pycache__/checker.cpython-39.pyc b/Checkers/modules/__pycache__/checker.cpython-39.pyc
deleted file mode 100644
index 84b1819..0000000
Binary files a/Checkers/modules/__pycache__/checker.cpython-39.pyc and /dev/null differ
diff --git a/Checkers/modules/__pycache__/checker_board.cpython-39.pyc b/Checkers/modules/__pycache__/checker_board.cpython-39.pyc
deleted file mode 100644
index 4888073..0000000
Binary files a/Checkers/modules/__pycache__/checker_board.cpython-39.pyc and /dev/null differ
diff --git a/Checkers/modules/__pycache__/pieces.cpython-39.pyc b/Checkers/modules/__pycache__/pieces.cpython-39.pyc
deleted file mode 100644
index ea51339..0000000
Binary files a/Checkers/modules/__pycache__/pieces.cpython-39.pyc and /dev/null differ
diff --git a/Checkers/modules/__pycache__/statics.cpython-39.pyc b/Checkers/modules/__pycache__/statics.cpython-39.pyc
deleted file mode 100644
index a4580f7..0000000
Binary files a/Checkers/modules/__pycache__/statics.cpython-39.pyc and /dev/null differ
diff --git a/Checkers/modules/checker.py b/Checkers/modules/checker.py
deleted file mode 100644
index 26d3f62..0000000
--- a/Checkers/modules/checker.py
+++ /dev/null
@@ -1,71 +0,0 @@
-'''
-Author : Tomasz Modrzejewski
-
-'''
-
-import pygame as pg
-from .checker_board import *
-from .statics import *
-from .pieces import *
-
-class checker:
- def __init__(self, window):
- self._init()
- self.window = window
-
- # to update the position
- def update (self):
- self.board.draw(self.window)
- self.draw_moves(self.valid_moves)
- pg.display.update()
-
- def _init(self):
- self.select = None
- self.board = checker_board()
- self.turn = black
- self.valid_moves = {}
-
- # to reset the position
- def reset (self):
- self._init()
-
- # select row and column
- def selectrc(self, row, col):
- if (self.select):
- result = self._move(row, col)
- if (not result):
- self.select = None
-
- piece = self.board.get_piece(row, col)
- if ((piece != 0) and (piece.color == self.turn)):
- self.select = piece
- self.valid_moves = self.board.get_valid_moves(piece)
- return True
- return False
-
- # to move the pieces
- def _move(self, row, col):
- piece = self.board.get_piece(row, col)
- if ((self.select) and (piece == 0) and (row, col) in self.valid_moves):
- self.board.move(self.select, row, col)
- skip = self.valid_moves[(row, col)]
- if (skip):
- self.board.remove(skip)
- self.chg_turn()
- else:
- return False
- return True
-
- # to draw next possible move
- def draw_moves (self, moves):
- for move in moves:
- row, col = move
- pg.draw.circle(self.window, red, (col * sq_size + sq_size // 2, row * sq_size + sq_size // 2), 15)
-
- # for changing the turn
- def chg_turn (self):
- self.valid_moves = {}
- if (self.turn == black):
- self.turn = white
- else:
- self.turn = black
\ No newline at end of file
diff --git a/Checkers/modules/checker_board.py b/Checkers/modules/checker_board.py
deleted file mode 100644
index f68d3ff..0000000
--- a/Checkers/modules/checker_board.py
+++ /dev/null
@@ -1,156 +0,0 @@
-'''
-Author : Tomasz Modrzejewski
-
-'''
-
-import pygame as pg
-from .statics import *
-from .pieces import *
-
-# checker board creation
-class checker_board:
- def __init__(self):
- self.board = []
- self.selected = None
- self.black_l = self.white_l = 12
- self.black_k = self.white_k = 0
- self.create_board()
-
- # to design the board
- def draw_cubes(self, window):
- window.fill(green)
- for row in range(rows):
- for col in range(row % 2, cols, 2):
- pg.draw.rect(window, yellow, (row * sq_size, col * sq_size, sq_size, sq_size))
-
- def move (self, piece, row, col):
- self.board[piece.row][piece.col], self.board[row][col] = self.board[row][col], self.board[piece.row][piece.col]
- piece.move(row, col)
- if (row == rows - 1 or row == 0):
- piece.make_king()
- if (piece.color == white):
- self.white_k += 1
- else:
- self.black_k += 1
-
- # to get piece whatever they want
- def get_piece (self, row, col):
- return self.board[row][col]
-
- def create_board(self):
- for row in range(rows):
- self.board.append([])
- for col in range(cols):
- if ( col % 2 == ((row + 1) % 2) ):
- if (row < 3):
- self.board[row].append(pieces(row, col, white))
- elif (row > 4):
- self.board[row].append(pieces(row, col, black))
- else:
- self.board[row].append(0)
- else:
- self.board[row].append(0)
-
- def draw (self, window):
- self.draw_cubes(window)
- for row in range(rows):
- for col in range(cols):
- piece = self.board[row][col]
- if (piece != 0):
- piece.draw(window)
-
- def get_valid_moves(self, piece):
- moves = {}
- l = piece.col - 1
- r = piece.col + 1
- row = piece.row
-
- if (piece.color == black or piece.king):
- moves.update(self._traverse_l(row - 1, max(row - 3, -1), -1, piece.color, l))
- moves.update(self._traverse_r(row - 1, max(row - 3, -1), -1, piece.color, r))
-
- if (piece.color == white or piece.king):
- moves.update(self._traverse_l(row + 1, min(row + 3, rows), 1, piece.color, l))
- moves.update(self._traverse_r(row + 1, min(row + 3, rows), 1, piece.color, r))
-
- return moves
-
- def remove (self, pieces):
- for piece in pieces:
- self.board[piece.row][piece.col] = 0
- if (piece != 0):
- if (piece.color == black):
- self.black_l -= 1
- else:
- self.white_l -= 1
-
- def winner (self):
- if (self.black_l <= 0):
- return white
- elif (self.white_l <= 0):
- return black
- return None
-
- # Traversal Left
- def _traverse_l (self, start, stop, step, color, l, skip = []):
- moves = {}
- last = []
- for r in range(start, stop, step):
- if (l < 0):
- break
- current = self.board[r][l]
- if (current == 0):
- if (skip and not last):
- break
- elif (skip):
- moves[(r, l)] = last + skip
- else:
- moves[(r, l)] = last
-
- if (last):
- if (step == -1):
- row = max(r - 3, 0)
- else:
- row = min(r + 3, rows)
- moves.update(self._traverse_l(r + step, row, step, color, l - 1, skip = last))
- moves.update(self._traverse_r(r + step, row, step, color, l + 1, skip = last))
- break
-
- elif (current.color == color):
- break
- else:
- last = [current]
- l -= 1
- return moves
-
- # Traversal Right
- def _traverse_r (self, start, stop, step, color, right, skip = []):
- moves = {}
- last = []
- for r in range(start, stop, step):
- if (right >= cols):
- break
- current = self.board[r][right]
- if (current == 0):
- if (skip and not last):
- break
- elif (skip):
- moves[(r, right)] = last + skip
- else:
- moves[(r, right)] = last
-
- if (last):
- if (step == -1):
- row = max(r - 3, 0)
- else:
- row = min(r + 3, rows)
- moves.update(self._traverse_l(r + step, row, step, color, right - 1, skip = last))
- moves.update(self._traverse_r(r + step, row, step, color, right + 1, skip = last))
- break
-
- elif (current.color == color):
- break
- else:
- last = [current]
- right += 1
- return moves
\ No newline at end of file
diff --git a/Checkers/modules/pieces.py b/Checkers/modules/pieces.py
deleted file mode 100644
index 82fb764..0000000
--- a/Checkers/modules/pieces.py
+++ /dev/null
@@ -1,52 +0,0 @@
-'''
-Author : Tomasz Modrzejewski
-
-'''
-
-from .statics import *
-import pygame as pg
-
-class pieces:
-
- padding = 17
- outline = 2
-
- def __init__(self, row, col, color):
- self.row = row
- self.col = col
- self.color = color
- self.king = False
-
- '''if (self.color == yellow):
- self.direction = -1
- else:
- self.direction = 1'''
-
- self.x = self.y = 0
- self.calculate_pos()
-
- # calculate the positions
- def calculate_pos (self):
- self.x = ((sq_size * self.col) + (sq_size // 2))
- self.y = ((sq_size * self.row) + (sq_size // 2))
-
- # for making king
- def make_king (self):
- self.king = True
-
- def draw (self, window):
- radd = ((sq_size // 2) - self.padding)
- pg.draw.circle(window, gray, (self.x, self.y), radd + self.outline)
- pg.draw.circle(window, self.color, (self.x, self.y), radd)
- if (self.king):
- window.blit(crown, ((self.x - crown.get_width() // 2), (self.y - crown.get_height() // 2)))
-
- def move (self, row, col):
- self.row = row
- self.col = col
- self.calculate_pos()
-
- # represtation as a string
- def __repr__(self):
- return str(self.color)
-
diff --git a/Checkers/modules/statics.py b/Checkers/modules/statics.py
deleted file mode 100644
index 7a9cddc..0000000
--- a/Checkers/modules/statics.py
+++ /dev/null
@@ -1,24 +0,0 @@
-'''
-Author : Tomasz Modrzejewski
-
-'''
-
-import pygame as pg
-
-# size of board
-width, height = 800, 800
-rows , cols = 8, 8
-sq_size = width // cols
-
-# colours for board
-yellow = (255, 255, 0)
-white = (255, 255, 255)
-green = (0, 255, 0)
-gray = (128, 128, 128)
-red = (255, 0, 0)
-
-# colour for for next move
-black = (0, 0, 0)
-
-crown = pg.transform.scale(pg.image.load('assets/crown.png'), (45, 25))
-
diff --git a/Conversation.py b/Conversation.py
deleted file mode 100644
index cfccb31..0000000
--- a/Conversation.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# imports modules
-import sys
-import time
-from getpass import getuser
-
-# user puts in their name
-name = getuser()
-name_check = input("Is your name " + name + "? → ")
-if name_check.lower().startswith("y"):
- print("Okay.")
- time.sleep(1)
-
-if name_check.lower().startswith("n"):
- name = input("Then what is it? → ")
-
-# Python lists their name
-userList = name
-
-# Python & user dialoge
-print("Hello", name + ", my name is Python." )
-time.sleep(0.8)
-print("The first letter of your name is", userList[0] + ".")
-time.sleep(0.8)
-print("Nice to meet you. :)")
-time.sleep(0.8)
-response = input("Would you say it's nice to meet me? → ")
-
-# other dialoge
-if response.lower().startswith("y"):
- print("Nice :)")
- sys.exit()
-
-elif response.lower().startswith("n"):
- response2 = input("Is it because I am a robot? → ")
-
-else:
- print("You may have made an input error. Please restart and try again.")
- sys.exit()
-if response2.lower().startswith("y"):
- print("Aw :(")
-
-elif response2.lower().startswith("n"):
- response3 = input("Then why? → ")
- time.sleep(1)
- print("Oh.")
-
-else:
- print("You may have made an input error. Please restart and try again.")
- sys.exit()
-
-
-
-
diff --git a/Cube.py b/Cube.py
deleted file mode 100644
index 82e832d..0000000
--- a/Cube.py
+++ /dev/null
@@ -1,181 +0,0 @@
-from turtle import *
-from math import *
-from time import sleep
-
-setup()
-up()
-# speed('normal') #probably redundant at this stage if using delay(0)
-home()
-
-tracer(0, 0) # make drawing faster. Comment this to see turtle drawings
-hideturtle() # comment out to see turtle draw
-
-# 'Sky' color as the background
-bgcolor('darkblue')
-
-# global position values for the cube
-pos = [0.0, 0.0, 0.0]
-rot = [0.0, 0.0, 0.0]
-size = 20
-Pos = pos
-Rot = rot
-# Let's set up original positions for all vertices
-verts = [[1.0*size, 1.0*size, 1.0*size], [-1.0*size, 1.0*size, 1.0*size],
- [-1.0*size, -1.0*size, 1.0*size], [1.0*size, -1.0*size, 1.0*size],
- [1.0*size, 1.0*size, -1.0*size], [-1.0*size, 1.0*size, -1.0*size],
- [-1.0*size, -1.0*size, -1.0*size], [1.0*size, -1.0*size, -1.0*size]]
-# as well we will set up a list of normals based on the vert array indices
-# this was the only way I knew to do it similar to an .obj 3D file? I read about
-# this somewhere and I'm pretty sure this is how Unity generates meshes as well
-# [Citation needed]
-faces = [[0, 1, 2, 3], [5, 4, 7, 6], [4, 0, 3, 7],
- [1, 5, 6, 2], [4, 5, 1, 0], [3, 2, 6, 7]]
-
-# This was written using a lot of magic numbers because my 'camera' is set up
-# as a static object and therefore there was a lot of errors in a few calculations.
-# I basically changed random magic numbers on the go to try to get the best looking
-# result.
-
-
-def cull_faces(inverts=[], infaces=[]):
- return_faces = []
- # perform leet maths for face culling
- for _ in range(len(infaces)):
- # coordinates (easier to use in maths)
- one = [verts[infaces[_][0]][0], verts[infaces[_][0]]
- [1], verts[infaces[_][0]][2]]
- two = [verts[infaces[_][1]][0], verts[infaces[_][1]]
- [1], verts[infaces[_][1]][2]]
- three = [verts[infaces[_][2]][0],
- verts[infaces[_][2]][1], verts[infaces[_][2]][2]]
- # calculate normals and normal lengths
- tempnorm = [(one[0]-two[0]), (one[1]-two[1]), (one[2]-two[2])]
- normlength = sqrt(((one[0]-two[0])**2.0) +
- ((one[1]-two[1])**2.0)+((one[2]-two[2])**2.0))
- norm1 = [tempnorm[0]/normlength, tempnorm[1] /
- normlength, tempnorm[2]/normlength]
- tempnorm = [(three[0]-two[0]), (three[1]-two[1]), (three[2]-two[2])]
- normlength = sqrt(
- ((three[0]-two[0])**2.0)+((three[1]-two[1])**2.0)+((three[2]-two[2])**2.0))
- norm2 = [tempnorm[0]/normlength, tempnorm[1] /
- normlength, tempnorm[2]/normlength]
- crossvec = [(norm1[1]*norm2[2])-(norm1[2]*norm2[1]), (norm1[2]*norm2[0]) -
- (norm1[0]*norm2[2]), (norm1[0]*norm2[1])-(norm1[1]*norm2[0])]
- # probably the only important vectors in this code block for the faux camera's direction and the 'static directional light's normals
- # changing any of these will result in a different lighting angle or camera angle (camera isn't really relevant since there's no other references)
- cameravec = [0.0, 0.0, 1.0]
- lightvec = [0, -0.45, 0.45]
- # End important magic vectors
- dot = (cameravec[0]*crossvec[0])+(cameravec[1]
- * crossvec[1])+(cameravec[2]*crossvec[2])
- if dot < -0.15:
- brightness = (lightvec[0]*crossvec[0])+(lightvec[1]
- * crossvec[1])+(lightvec[2]*crossvec[2])
- return_faces.append(infaces[_])
- return_faces.append(brightness)
- return return_faces
-
-
-def draw(infaces):
- print(infaces, len(infaces)/2)
- for _ in range(int(len(infaces)/2)):
- # This color value can be changed to get a desired face colour in RGB (changing the magic numbers as a 'base lighting' value)
- color((0, 0.4+(infaces[_*2+1])*0.4, 0))
- up()
- # important magic numbers here also
- goto(verts[infaces[_*2][0]][0]*(5+verts[infaces[_*2][0]][2]/20.0),
- verts[infaces[_*2][0]][1]*(5+verts[infaces[_*2][0]][2]/20.0))
- begin_fill()
- down()
- goto(verts[infaces[_*2][1]][0]*(5+verts[infaces[_*2][1]][2]/20.0),
- verts[infaces[_*2][1]][1]*(5+verts[infaces[_*2][1]][2]/20.0))
- goto(verts[infaces[_*2][2]][0]*(5+verts[infaces[_*2][2]][2]/20.0),
- verts[infaces[_*2][2]][1]*(5+verts[infaces[_*2][2]][2]/20.0))
- goto(verts[infaces[_*2][3]][0]*(5+verts[infaces[_*2][3]][2]/20.0),
- verts[infaces[_*2][3]][1]*(5+verts[infaces[_*2][3]][2]/20.0))
- goto(verts[infaces[_*2][0]][0]*(5+verts[infaces[_*2][0]][2]/20.0),
- verts[infaces[_*2][0]][1]*(5+verts[infaces[_*2][0]][2]/20.0))
- end_fill()
- up()
- # These 3D numbers are calculated very roughly using not much accuracy,
- # try not to hate on my magic number fairly accurate representations of vertices in
- # 3D space ;P
- update()
-
-
-def rotate(xAxis=0, yAxis=0, zAxis=0):
- # calculate for every angle
- thetaX = radians(xAxis)
- thetaY = radians(yAxis)
- thetaZ = radians(zAxis)
- csX = cos(thetaX)
- snX = sin(thetaX)
- csY = cos(thetaY)
- snY = sin(thetaY)
- csZ = cos(thetaZ)
- snZ = sin(thetaZ)
- for vert in range(len(verts)):
- # calculate changes to Y axis
- yx = float(verts[vert][0] * csY - verts[vert][2] * snY)
- yz = float(verts[vert][0] * snY + verts[vert][2] * csY)
- # rotate around Y axis
- verts[vert][0] = yx
- verts[vert][2] = yz
- # calculate changes to X axis
- xy = float(verts[vert][1] * csX - verts[vert][2] * snX)
- xz = float(verts[vert][1] * snX + verts[vert][2] * csX)
- verts[vert][1] = xy
- verts[vert][2] = xz
- # calculate changes to Z axis
- zx = float(verts[vert][0] * csZ - verts[vert][1] * snZ)
- zy = float(verts[vert][0] * snZ + verts[vert][1] * csZ)
- # rotate around Z axis
- verts[vert][0] = zx
- verts[vert][1] = zy
-
-
-def L():
- clear()
- rotate(0, 5, 0)
- draw(cull_faces(verts, faces))
-
-
-def R():
- clear()
- rotate(0, -5, 0)
- draw(cull_faces(verts, faces))
-
-
-def U():
- clear()
- rotate(-5, 0, 0)
- draw(cull_faces(verts, faces))
-
-
-def D():
- clear()
- rotate(5, 0, 0)
- draw(cull_faces(verts, faces))
-
-
-onkey(L, "Left")
-onkey(R, "Right")
-onkey(U, "Up")
-onkey(D, "Down")
-listen()
-rotate(0, 20, 20)
-width(2)
-
-
-draw(cull_faces(verts, faces))
-
-######################Important loop code##############################
-# commenting this loop out only updates on arrow keys / rotations
-
-#for count in range(5000):
-#clear()
-#rotate(10,0,0)
-#draw(cull_faces(verts,faces))
-#sleep(0.09)
-
-done()
diff --git a/Delete_Linked_List.py b/Delete_Linked_List.py
deleted file mode 100644
index 71c66b0..0000000
--- a/Delete_Linked_List.py
+++ /dev/null
@@ -1,58 +0,0 @@
-class Node:
- def __init__(self, data):
- self.data = data
- self.next = None
-
-
-class Linked_List:
- def __init__(self):
- self.head = None
-
- def Insert_At_End(self, new_data):
- new_node = Node(new_data)
- if self.head is None:
- self.head = new_node
- return
- current = self.head
- while(current.next):
- current = current.next
- current.next = new_node
-
- def Delete(self, key):
- temp = self.head
- if temp is None:
- return "Can't Delete!"
- else:
- if temp.data == key:
- self.head = temp.next
- temp = None
- while temp is not None:
- prev = temp
- temp = temp.next
- curr = temp.next
- if temp.data == key:
- prev.next = curr
- return
-
- def Display(self):
- temp = self.head
- while(temp):
- print(temp.data, "->", end=" ")
- temp = temp.next
- print("None")
-
-
-if __name__ == "__main__":
- L_list = Linked_List()
- L_list.Insert_At_End(1)
- L_list.Insert_At_End(2)
- L_list.Insert_At_End(3)
- L_list.Insert_At_End(4)
- L_list.Insert_At_End(5)
- L_list.Insert_At_End(6)
- L_list.Insert_At_End(7)
- print("Linked List: ")
- L_list.Display()
- print("Deleted Linked List: ")
- L_list.Delete(3)
- L_list.Display()
diff --git a/Detect_Remove_loop.py b/Detect_Remove_loop.py
deleted file mode 100644
index c3c9098..0000000
--- a/Detect_Remove_loop.py
+++ /dev/null
@@ -1,65 +0,0 @@
-class Node:
- def __init__(self, data):
- self.data = data
- self.next = None
-
-
-class Linked_List:
- def __init__(self):
- self.head = None
-
- def Insert_At_End(self, new_data):
- new_node = Node(new_data)
- if self.head is None:
- self.head = new_node
- return
- current = self.head
- while(current.next):
- current = current.next
- current.next = new_node
-
- def Detect_and_Remove_Loop(self):
- slow = fast = self.head
- while(slow and fast and fast.next):
- slow = slow.next
- fast = fast.next.next
- if slow == fast:
- self.Remove_loop(slow)
- print("Loop Found")
- return 1
- return 0
-
- def Remove_loop(self, Loop_node):
- ptr1 = self.head
- while(1):
- ptr2 = Loop_node
- while(ptr2.next != Loop_node and ptr2.next != ptr1):
- ptr2 = ptr2.next
- if ptr2.next == ptr1:
- break
- ptr1 = ptr1.next
- ptr2.next = None
-
- def Display(self):
- temp = self.head
- while(temp):
- print(temp.data, "->", end=" ")
- temp = temp.next
- print("None")
-
-
-if __name__ == "__main__":
- L_list = Linked_List()
- L_list.Insert_At_End(8)
- L_list.Insert_At_End(5)
- L_list.Insert_At_End(10)
- L_list.Insert_At_End(7)
- L_list.Insert_At_End(6)
- L_list.Insert_At_End(11)
- L_list.Insert_At_End(9)
- print("Linked List with Loop: ")
- L_list.Display()
- print("Linked List without Loop: ")
- L_list.head.next.next.next.next.next.next.next = L_list.head.next.next
- L_list.Detect_and_Remove_Loop()
- L_list.Display()
diff --git a/Email ID Dictionary/README.md b/Email ID Dictionary/README.md
deleted file mode 100644
index 0ea1bc8..0000000
--- a/Email ID Dictionary/README.md
+++ /dev/null
@@ -1 +0,0 @@
-Write a program to read through the mbox-short.txt and figure out who has sent the greatest number of mail messages. The program looks for 'From ' lines and takes the second word of those lines as the person who sent the mail. The program creates a Python dictionary that maps the sender's mail address to a count of the number of times they appear in the file. After the dictionary is produced, the program reads through the dictionary using a maximum loop to find the most prolific committer.
\ No newline at end of file
diff --git a/Email ID Dictionary/dict1.py b/Email ID Dictionary/dict1.py
deleted file mode 100644
index 55318dd..0000000
--- a/Email ID Dictionary/dict1.py
+++ /dev/null
@@ -1,29 +0,0 @@
-counts = dict()
-mails = list()
-fname = input('Enter file name:')
-fh = open(fname)
-for line in fh:
- if not line.startswith('From '):
- continue
-# if line.startswith('From:'):
-# continue
- id = line.split()
- mail = id[1]
- mails.append(mail)
-
-freq_mail = max(mails, key=mails.count) # To find frequent mail
-print(freq_mail, mails.count(freq_mail)) # To find countof frequent mail
-
-
-"""
-for x in mails:
- counts[x]=counts.get(x,0)+1
-bigmail=None
-bigvalue=None
-for key,value in counts.items():
- if bigvalue==None or bigvalue
-Received: from murder (mail.umich.edu [141.211.14.90])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Sat, 05 Jan 2008 09:14:16 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Sat, 05 Jan 2008 09:14:16 -0500
-Received: from holes.mr.itd.umich.edu (holes.mr.itd.umich.edu [141.211.14.79])
- by flawless.mail.umich.edu () with ESMTP id m05EEFR1013674;
- Sat, 5 Jan 2008 09:14:15 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY holes.mr.itd.umich.edu ID 477F90B0.2DB2F.12494 ;
- 5 Jan 2008 09:14:10 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id 5F919BC2F2;
- Sat, 5 Jan 2008 14:10:05 +0000 (GMT)
-Message-ID: <200801051412.m05ECIaH010327@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 899
- for ;
- Sat, 5 Jan 2008 14:09:50 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id A215243002
- for ; Sat, 5 Jan 2008 14:13:33 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m05ECJVp010329
- for ; Sat, 5 Jan 2008 09:12:19 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m05ECIaH010327
- for source@collab.sakaiproject.org; Sat, 5 Jan 2008 09:12:18 -0500
-Date: Sat, 5 Jan 2008 09:12:18 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to stephen.marquard@uct.ac.za using -f
-To: source@collab.sakaiproject.org
-From: stephen.marquard@uct.ac.za
-Subject: [sakai] svn commit: r39772 - content/branches/sakai_2-5-x/content-impl/impl/src/java/org/sakaiproject/content/impl
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Sat Jan 5 09:14:16 2008
-X-DSPAM-Confidence: 0.8475
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39772
-
-Author: stephen.marquard@uct.ac.za
-Date: 2008-01-05 09:12:07 -0500 (Sat, 05 Jan 2008)
-New Revision: 39772
-
-Modified:
-content/branches/sakai_2-5-x/content-impl/impl/src/java/org/sakaiproject/content/impl/ContentServiceSqlOracle.java
-content/branches/sakai_2-5-x/content-impl/impl/src/java/org/sakaiproject/content/impl/DbContentService.java
-Log:
-SAK-12501 merge to 2-5-x: r39622, r39624:5, r39632:3 (resolve conflict from differing linebreaks for r39622)
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-
-
-From louis@media.berkeley.edu Fri Jan 4 18:10:48 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.97])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Fri, 04 Jan 2008 18:10:48 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Fri, 04 Jan 2008 18:10:48 -0500
-Received: from icestorm.mr.itd.umich.edu (icestorm.mr.itd.umich.edu [141.211.93.149])
- by sleepers.mail.umich.edu () with ESMTP id m04NAbGa029441;
- Fri, 4 Jan 2008 18:10:37 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY icestorm.mr.itd.umich.edu ID 477EBCE3.161BB.4320 ;
- 4 Jan 2008 18:10:31 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id 07969BB706;
- Fri, 4 Jan 2008 23:10:33 +0000 (GMT)
-Message-ID: <200801042308.m04N8v6O008125@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 710
- for ;
- Fri, 4 Jan 2008 23:10:10 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id 4BA2F42F57
- for ; Fri, 4 Jan 2008 23:10:10 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m04N8vHG008127
- for ; Fri, 4 Jan 2008 18:08:57 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m04N8v6O008125
- for source@collab.sakaiproject.org; Fri, 4 Jan 2008 18:08:57 -0500
-Date: Fri, 4 Jan 2008 18:08:57 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to louis@media.berkeley.edu using -f
-To: source@collab.sakaiproject.org
-From: louis@media.berkeley.edu
-Subject: [sakai] svn commit: r39771 - in bspace/site-manage/sakai_2-4-x/site-manage-tool/tool/src: bundle java/org/sakaiproject/site/tool
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Fri Jan 4 18:10:48 2008
-X-DSPAM-Confidence: 0.6178
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39771
-
-Author: louis@media.berkeley.edu
-Date: 2008-01-04 18:08:50 -0500 (Fri, 04 Jan 2008)
-New Revision: 39771
-
-Modified:
-bspace/site-manage/sakai_2-4-x/site-manage-tool/tool/src/bundle/sitesetupgeneric.properties
-bspace/site-manage/sakai_2-4-x/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java
-Log:
-BSP-1415 New (Guest) user Notification
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-From cwen@iupui.edu
-
-From zqian@umich.edu Fri Jan 4 16:10:39 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.25])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Fri, 04 Jan 2008 16:10:39 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Fri, 04 Jan 2008 16:10:39 -0500
-Received: from ghostbusters.mr.itd.umich.edu (ghostbusters.mr.itd.umich.edu [141.211.93.144])
- by panther.mail.umich.edu () with ESMTP id m04LAcZw014275;
- Fri, 4 Jan 2008 16:10:38 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY ghostbusters.mr.itd.umich.edu ID 477EA0C6.A0214.25480 ;
- 4 Jan 2008 16:10:33 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id C48CDBB490;
- Fri, 4 Jan 2008 21:10:31 +0000 (GMT)
-Message-ID: <200801042109.m04L92hb007923@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 906
- for ;
- Fri, 4 Jan 2008 21:10:18 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id 7D13042F71
- for ; Fri, 4 Jan 2008 21:10:14 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m04L927E007925
- for ; Fri, 4 Jan 2008 16:09:02 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m04L92hb007923
- for source@collab.sakaiproject.org; Fri, 4 Jan 2008 16:09:02 -0500
-Date: Fri, 4 Jan 2008 16:09:02 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to zqian@umich.edu using -f
-To: source@collab.sakaiproject.org
-From: zqian@umich.edu
-Subject: [sakai] svn commit: r39770 - site-manage/branches/sakai_2-5-x/site-manage-tool/tool/src/webapp/vm/sitesetup
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Fri Jan 4 16:10:39 2008
-X-DSPAM-Confidence: 0.6961
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39770
-
-Author: zqian@umich.edu
-Date: 2008-01-04 16:09:01 -0500 (Fri, 04 Jan 2008)
-New Revision: 39770
-
-Modified:
-site-manage/branches/sakai_2-5-x/site-manage-tool/tool/src/webapp/vm/sitesetup/chef_site-siteInfo-list.vm
-Log:
-merge fix to SAK-9996 into 2-5-x branch: svn merge -r 39687:39688 https://source.sakaiproject.org/svn/site-manage/trunk/
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-
-
-From rjlowe@iupui.edu Fri Jan 4 15:46:24 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.25])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Fri, 04 Jan 2008 15:46:24 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Fri, 04 Jan 2008 15:46:24 -0500
-Received: from dreamcatcher.mr.itd.umich.edu (dreamcatcher.mr.itd.umich.edu [141.211.14.43])
- by panther.mail.umich.edu () with ESMTP id m04KkNbx032077;
- Fri, 4 Jan 2008 15:46:23 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY dreamcatcher.mr.itd.umich.edu ID 477E9B13.2F3BC.22965 ;
- 4 Jan 2008 15:46:13 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id 4AE03BB552;
- Fri, 4 Jan 2008 20:46:13 +0000 (GMT)
-Message-ID: <200801042044.m04Kiem3007881@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 38
- for ;
- Fri, 4 Jan 2008 20:45:56 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id A55D242F57
- for ; Fri, 4 Jan 2008 20:45:52 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m04KieqE007883
- for ; Fri, 4 Jan 2008 15:44:40 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m04Kiem3007881
- for source@collab.sakaiproject.org; Fri, 4 Jan 2008 15:44:40 -0500
-Date: Fri, 4 Jan 2008 15:44:40 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to rjlowe@iupui.edu using -f
-To: source@collab.sakaiproject.org
-From: rjlowe@iupui.edu
-Subject: [sakai] svn commit: r39769 - in gradebook/trunk/app/ui/src: java/org/sakaiproject/tool/gradebook/ui/helpers/beans java/org/sakaiproject/tool/gradebook/ui/helpers/producers webapp/WEB-INF webapp/WEB-INF/bundle
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Fri Jan 4 15:46:24 2008
-X-DSPAM-Confidence: 0.7565
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39769
-
-Author: rjlowe@iupui.edu
-Date: 2008-01-04 15:44:39 -0500 (Fri, 04 Jan 2008)
-New Revision: 39769
-
-Modified:
-gradebook/trunk/app/ui/src/java/org/sakaiproject/tool/gradebook/ui/helpers/beans/AssignmentGradeRecordBean.java
-gradebook/trunk/app/ui/src/java/org/sakaiproject/tool/gradebook/ui/helpers/producers/GradeGradebookItemProducer.java
-gradebook/trunk/app/ui/src/webapp/WEB-INF/applicationContext.xml
-gradebook/trunk/app/ui/src/webapp/WEB-INF/bundle/messages.properties
-gradebook/trunk/app/ui/src/webapp/WEB-INF/requestContext.xml
-Log:
-SAK-12180 - Fixed errors with grading helper
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-
-
-From zqian@umich.edu Fri Jan 4 15:03:18 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.46])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Fri, 04 Jan 2008 15:03:18 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Fri, 04 Jan 2008 15:03:18 -0500
-Received: from firestarter.mr.itd.umich.edu (firestarter.mr.itd.umich.edu [141.211.14.83])
- by fan.mail.umich.edu () with ESMTP id m04K3HGF006563;
- Fri, 4 Jan 2008 15:03:17 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY firestarter.mr.itd.umich.edu ID 477E9100.8F7F4.1590 ;
- 4 Jan 2008 15:03:15 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id 57770BB477;
- Fri, 4 Jan 2008 20:03:09 +0000 (GMT)
-Message-ID: <200801042001.m04K1cO0007738@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 622
- for ;
- Fri, 4 Jan 2008 20:02:46 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id AB4D042F4D
- for ; Fri, 4 Jan 2008 20:02:50 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m04K1cXv007740
- for ; Fri, 4 Jan 2008 15:01:38 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m04K1cO0007738
- for source@collab.sakaiproject.org; Fri, 4 Jan 2008 15:01:38 -0500
-Date: Fri, 4 Jan 2008 15:01:38 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to zqian@umich.edu using -f
-To: source@collab.sakaiproject.org
-From: zqian@umich.edu
-Subject: [sakai] svn commit: r39766 - site-manage/branches/sakai_2-4-x/site-manage-tool/tool/src/java/org/sakaiproject/site/tool
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Fri Jan 4 15:03:18 2008
-X-DSPAM-Confidence: 0.7626
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39766
-
-Author: zqian@umich.edu
-Date: 2008-01-04 15:01:37 -0500 (Fri, 04 Jan 2008)
-New Revision: 39766
-
-Modified:
-site-manage/branches/sakai_2-4-x/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java
-Log:
-merge fix to SAK-10788 into site-manage 2.4.x branch:
-
-Sakai Source Repository #38024 Wed Nov 07 14:54:46 MST 2007 zqian@umich.edu Fix to SAK-10788: If a provided id in a couse site is fake or doesn't provide any user information, Site Info appears to be like project site with empty participant list
-
-Watch for enrollments object being null and concatenate provider ids when there are more than one.
-Files Changed
-MODIFY /site-manage/trunk/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java
-
-
-
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-
-
-From rjlowe@iupui.edu Fri Jan 4 14:50:18 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.93])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Fri, 04 Jan 2008 14:50:18 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Fri, 04 Jan 2008 14:50:18 -0500
-Received: from eyewitness.mr.itd.umich.edu (eyewitness.mr.itd.umich.edu [141.211.93.142])
- by mission.mail.umich.edu () with ESMTP id m04JoHJi019755;
- Fri, 4 Jan 2008 14:50:17 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY eyewitness.mr.itd.umich.edu ID 477E8DF2.67B91.5278 ;
- 4 Jan 2008 14:50:13 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id 2D1B9BB492;
- Fri, 4 Jan 2008 19:47:10 +0000 (GMT)
-Message-ID: <200801041948.m04JmdwO007705@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 960
- for ;
- Fri, 4 Jan 2008 19:46:50 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id B3E6742F4A
- for ; Fri, 4 Jan 2008 19:49:51 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m04JmeV9007707
- for ; Fri, 4 Jan 2008 14:48:40 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m04JmdwO007705
- for source@collab.sakaiproject.org; Fri, 4 Jan 2008 14:48:39 -0500
-Date: Fri, 4 Jan 2008 14:48:39 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to rjlowe@iupui.edu using -f
-To: source@collab.sakaiproject.org
-From: rjlowe@iupui.edu
-Subject: [sakai] svn commit: r39765 - in gradebook/trunk/app: business/src/java/org/sakaiproject/tool/gradebook/business business/src/java/org/sakaiproject/tool/gradebook/business/impl ui ui/src/java/org/sakaiproject/tool/gradebook/ui/helpers/beans ui/src/java/org/sakaiproject/tool/gradebook/ui/helpers/entity ui/src/java/org/sakaiproject/tool/gradebook/ui/helpers/params ui/src/java/org/sakaiproject/tool/gradebook/ui/helpers/producers ui/src/webapp/WEB-INF ui/src/webapp/WEB-INF/bundle ui/src/webapp/content/templates
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Fri Jan 4 14:50:18 2008
-X-DSPAM-Confidence: 0.7556
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39765
-
-Author: rjlowe@iupui.edu
-Date: 2008-01-04 14:48:37 -0500 (Fri, 04 Jan 2008)
-New Revision: 39765
-
-Added:
-gradebook/trunk/app/ui/src/java/org/sakaiproject/tool/gradebook/ui/helpers/beans/AssignmentGradeRecordBean.java
-gradebook/trunk/app/ui/src/java/org/sakaiproject/tool/gradebook/ui/helpers/beans/AssignmentGradeRecordCreator.java
-gradebook/trunk/app/ui/src/java/org/sakaiproject/tool/gradebook/ui/helpers/entity/GradebookEntryGradeEntityProvider.java
-gradebook/trunk/app/ui/src/java/org/sakaiproject/tool/gradebook/ui/helpers/params/GradeGradebookItemViewParams.java
-gradebook/trunk/app/ui/src/java/org/sakaiproject/tool/gradebook/ui/helpers/producers/GradeGradebookItemProducer.java
-gradebook/trunk/app/ui/src/webapp/content/templates/grade-gradebook-item.html
-Modified:
-gradebook/trunk/app/business/src/java/org/sakaiproject/tool/gradebook/business/GradebookManager.java
-gradebook/trunk/app/business/src/java/org/sakaiproject/tool/gradebook/business/impl/GradebookManagerHibernateImpl.java
-gradebook/trunk/app/ui/pom.xml
-gradebook/trunk/app/ui/src/java/org/sakaiproject/tool/gradebook/ui/helpers/beans/GradebookItemBean.java
-gradebook/trunk/app/ui/src/java/org/sakaiproject/tool/gradebook/ui/helpers/entity/GradebookEntryEntityProvider.java
-gradebook/trunk/app/ui/src/java/org/sakaiproject/tool/gradebook/ui/helpers/producers/AddGradebookItemProducer.java
-gradebook/trunk/app/ui/src/webapp/WEB-INF/applicationContext.xml
-gradebook/trunk/app/ui/src/webapp/WEB-INF/bundle/messages.properties
-gradebook/trunk/app/ui/src/webapp/WEB-INF/requestContext.xml
-Log:
-SAK-12180 - New helper tool to grade an assignment
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-
-
-From cwen@iupui.edu Fri Jan 4 11:37:30 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.46])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Fri, 04 Jan 2008 11:37:30 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Fri, 04 Jan 2008 11:37:30 -0500
-Received: from tadpole.mr.itd.umich.edu (tadpole.mr.itd.umich.edu [141.211.14.72])
- by fan.mail.umich.edu () with ESMTP id m04GbT9x022078;
- Fri, 4 Jan 2008 11:37:29 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY tadpole.mr.itd.umich.edu ID 477E60B2.82756.9904 ;
- 4 Jan 2008 11:37:09 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id 8D13DBB001;
- Fri, 4 Jan 2008 16:37:07 +0000 (GMT)
-Message-ID: <200801041635.m04GZQGZ007313@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 120
- for ;
- Fri, 4 Jan 2008 16:36:40 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id D430B42E42
- for ; Fri, 4 Jan 2008 16:36:37 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m04GZQ7W007315
- for ; Fri, 4 Jan 2008 11:35:26 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m04GZQGZ007313
- for source@collab.sakaiproject.org; Fri, 4 Jan 2008 11:35:26 -0500
-Date: Fri, 4 Jan 2008 11:35:26 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to cwen@iupui.edu using -f
-To: source@collab.sakaiproject.org
-From: cwen@iupui.edu
-Subject: [sakai] svn commit: r39764 - in msgcntr/trunk/messageforums-app/src/java/org/sakaiproject/tool/messageforums: . ui
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Fri Jan 4 11:37:30 2008
-X-DSPAM-Confidence: 0.7002
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39764
-
-Author: cwen@iupui.edu
-Date: 2008-01-04 11:35:25 -0500 (Fri, 04 Jan 2008)
-New Revision: 39764
-
-Modified:
-msgcntr/trunk/messageforums-app/src/java/org/sakaiproject/tool/messageforums/PrivateMessagesTool.java
-msgcntr/trunk/messageforums-app/src/java/org/sakaiproject/tool/messageforums/ui/PrivateMessageDecoratedBean.java
-Log:
-unmerge Xingtang's checkin for SAK-12488.
-
-svn merge -r39558:39557 https://source.sakaiproject.org/svn/msgcntr/trunk
-U messageforums-app/src/java/org/sakaiproject/tool/messageforums/PrivateMessagesTool.java
-U messageforums-app/src/java/org/sakaiproject/tool/messageforums/ui/PrivateMessageDecoratedBean.java
-
-svn log -r 39558
-------------------------------------------------------------------------
-r39558 | hu2@iupui.edu | 2007-12-20 15:25:38 -0500 (Thu, 20 Dec 2007) | 3 lines
-
-SAK-12488
-when send a message to yourself. click reply to all, cc row should be null.
-http://jira.sakaiproject.org/jira/browse/SAK-12488
-------------------------------------------------------------------------
-
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-
-
-From cwen@iupui.edu Fri Jan 4 11:35:08 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.46])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Fri, 04 Jan 2008 11:35:08 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Fri, 04 Jan 2008 11:35:08 -0500
-Received: from it.mr.itd.umich.edu (it.mr.itd.umich.edu [141.211.93.151])
- by fan.mail.umich.edu () with ESMTP id m04GZ6lt020480;
- Fri, 4 Jan 2008 11:35:06 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY it.mr.itd.umich.edu ID 477E6033.6469D.21870 ;
- 4 Jan 2008 11:35:02 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id E40FABAE5B;
- Fri, 4 Jan 2008 16:34:38 +0000 (GMT)
-Message-ID: <200801041633.m04GX6eG007292@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 697
- for ;
- Fri, 4 Jan 2008 16:34:01 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id 1CD0C42E42
- for ; Fri, 4 Jan 2008 16:34:17 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m04GX6Y3007294
- for ; Fri, 4 Jan 2008 11:33:06 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m04GX6eG007292
- for source@collab.sakaiproject.org; Fri, 4 Jan 2008 11:33:06 -0500
-Date: Fri, 4 Jan 2008 11:33:06 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to cwen@iupui.edu using -f
-To: source@collab.sakaiproject.org
-From: cwen@iupui.edu
-Subject: [sakai] svn commit: r39763 - in msgcntr/trunk: messageforums-api/src/bundle/org/sakaiproject/api/app/messagecenter/bundle messageforums-app/src/java/org/sakaiproject/tool/messageforums
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Fri Jan 4 11:35:08 2008
-X-DSPAM-Confidence: 0.7615
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39763
-
-Author: cwen@iupui.edu
-Date: 2008-01-04 11:33:05 -0500 (Fri, 04 Jan 2008)
-New Revision: 39763
-
-Modified:
-msgcntr/trunk/messageforums-api/src/bundle/org/sakaiproject/api/app/messagecenter/bundle/Messages.properties
-msgcntr/trunk/messageforums-app/src/java/org/sakaiproject/tool/messageforums/PrivateMessagesTool.java
-Log:
-unmerge Xingtang's check in for SAK-12484.
-
-svn merge -r39571:39570 https://source.sakaiproject.org/svn/msgcntr/trunk
-U messageforums-api/src/bundle/org/sakaiproject/api/app/messagecenter/bundle/Messages.properties
-U messageforums-app/src/java/org/sakaiproject/tool/messageforums/PrivateMessagesTool.java
-
-svn log -r 39571
-------------------------------------------------------------------------
-r39571 | hu2@iupui.edu | 2007-12-20 21:26:28 -0500 (Thu, 20 Dec 2007) | 3 lines
-
-SAK-12484
-reply all cc list should not include the current user name.
-http://jira.sakaiproject.org/jira/browse/SAK-12484
-------------------------------------------------------------------------
-
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-
-
-From gsilver@umich.edu Fri Jan 4 11:12:37 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.25])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Fri, 04 Jan 2008 11:12:37 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Fri, 04 Jan 2008 11:12:37 -0500
-Received: from holes.mr.itd.umich.edu (holes.mr.itd.umich.edu [141.211.14.79])
- by panther.mail.umich.edu () with ESMTP id m04GCaHB030887;
- Fri, 4 Jan 2008 11:12:36 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY holes.mr.itd.umich.edu ID 477E5AEB.E670B.28397 ;
- 4 Jan 2008 11:12:30 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id 99715BAE7D;
- Fri, 4 Jan 2008 16:12:27 +0000 (GMT)
-Message-ID: <200801041611.m04GB1Lb007221@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 272
- for ;
- Fri, 4 Jan 2008 16:12:14 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id 0A6ED42DFC
- for ; Fri, 4 Jan 2008 16:12:12 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m04GB1Wt007223
- for ; Fri, 4 Jan 2008 11:11:01 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m04GB1Lb007221
- for source@collab.sakaiproject.org; Fri, 4 Jan 2008 11:11:01 -0500
-Date: Fri, 4 Jan 2008 11:11:01 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to gsilver@umich.edu using -f
-To: source@collab.sakaiproject.org
-From: gsilver@umich.edu
-Subject: [sakai] svn commit: r39762 - web/trunk/web-tool/tool/src/bundle
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Fri Jan 4 11:12:37 2008
-X-DSPAM-Confidence: 0.7601
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39762
-
-Author: gsilver@umich.edu
-Date: 2008-01-04 11:11:00 -0500 (Fri, 04 Jan 2008)
-New Revision: 39762
-
-Modified:
-web/trunk/web-tool/tool/src/bundle/iframe.properties
-Log:
-SAK-12596
-http://bugs.sakaiproject.org/jira/browse/SAK-12596
-- left moot (unused) entries commented for now
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-
-
-From gsilver@umich.edu Fri Jan 4 11:11:52 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.36])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Fri, 04 Jan 2008 11:11:52 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Fri, 04 Jan 2008 11:11:52 -0500
-Received: from creepshow.mr.itd.umich.edu (creepshow.mr.itd.umich.edu [141.211.14.84])
- by godsend.mail.umich.edu () with ESMTP id m04GBqqv025330;
- Fri, 4 Jan 2008 11:11:52 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY creepshow.mr.itd.umich.edu ID 477E5AB3.5CC32.30840 ;
- 4 Jan 2008 11:11:34 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id 62AA4BAE46;
- Fri, 4 Jan 2008 16:11:31 +0000 (GMT)
-Message-ID: <200801041610.m04GA5KP007209@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 1006
- for ;
- Fri, 4 Jan 2008 16:11:18 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id C596A3DFA2
- for ; Fri, 4 Jan 2008 16:11:16 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m04GA5LR007211
- for ; Fri, 4 Jan 2008 11:10:05 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m04GA5KP007209
- for source@collab.sakaiproject.org; Fri, 4 Jan 2008 11:10:05 -0500
-Date: Fri, 4 Jan 2008 11:10:05 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to gsilver@umich.edu using -f
-To: source@collab.sakaiproject.org
-From: gsilver@umich.edu
-Subject: [sakai] svn commit: r39761 - site/trunk/site-tool/tool/src/bundle
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Fri Jan 4 11:11:52 2008
-X-DSPAM-Confidence: 0.7605
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39761
-
-Author: gsilver@umich.edu
-Date: 2008-01-04 11:10:04 -0500 (Fri, 04 Jan 2008)
-New Revision: 39761
-
-Modified:
-site/trunk/site-tool/tool/src/bundle/admin.properties
-Log:
-SAK-12595
-http://bugs.sakaiproject.org/jira/browse/SAK-12595
-- left moot (unused) entries commented for now
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-
-
-From zqian@umich.edu Fri Jan 4 11:11:03 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.97])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Fri, 04 Jan 2008 11:11:03 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Fri, 04 Jan 2008 11:11:03 -0500
-Received: from carrie.mr.itd.umich.edu (carrie.mr.itd.umich.edu [141.211.93.152])
- by sleepers.mail.umich.edu () with ESMTP id m04GB3Vg011502;
- Fri, 4 Jan 2008 11:11:03 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY carrie.mr.itd.umich.edu ID 477E5A8D.B378F.24200 ;
- 4 Jan 2008 11:10:56 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id C7251BAD44;
- Fri, 4 Jan 2008 16:10:53 +0000 (GMT)
-Message-ID: <200801041609.m04G9EuX007197@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 483
- for ;
- Fri, 4 Jan 2008 16:10:27 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id 2E7043DFA2
- for ; Fri, 4 Jan 2008 16:10:26 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m04G9Eqg007199
- for ; Fri, 4 Jan 2008 11:09:15 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m04G9EuX007197
- for source@collab.sakaiproject.org; Fri, 4 Jan 2008 11:09:14 -0500
-Date: Fri, 4 Jan 2008 11:09:14 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to zqian@umich.edu using -f
-To: source@collab.sakaiproject.org
-From: zqian@umich.edu
-Subject: [sakai] svn commit: r39760 - in site-manage/trunk/site-manage-tool/tool/src: java/org/sakaiproject/site/tool webapp/vm/sitesetup
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Fri Jan 4 11:11:03 2008
-X-DSPAM-Confidence: 0.6959
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39760
-
-Author: zqian@umich.edu
-Date: 2008-01-04 11:09:12 -0500 (Fri, 04 Jan 2008)
-New Revision: 39760
-
-Modified:
-site-manage/trunk/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java
-site-manage/trunk/site-manage-tool/tool/src/webapp/vm/sitesetup/chef_site-siteInfo-list.vm
-Log:
-fix to SAK-10911: Refactor use of site.upd, site.upd.site.mbrship and site.upd.grp.mbrship permissions
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-
-
-From gsilver@umich.edu Fri Jan 4 11:10:22 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.39])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Fri, 04 Jan 2008 11:10:22 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Fri, 04 Jan 2008 11:10:22 -0500
-Received: from holes.mr.itd.umich.edu (holes.mr.itd.umich.edu [141.211.14.79])
- by faithful.mail.umich.edu () with ESMTP id m04GAL9k010604;
- Fri, 4 Jan 2008 11:10:21 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY holes.mr.itd.umich.edu ID 477E5A67.34350.23015 ;
- 4 Jan 2008 11:10:18 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id 98D04BAD43;
- Fri, 4 Jan 2008 16:10:11 +0000 (GMT)
-Message-ID: <200801041608.m04G8d7w007184@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 966
- for ;
- Fri, 4 Jan 2008 16:09:51 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id 9F89542DD0
- for ; Fri, 4 Jan 2008 16:09:50 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m04G8dXN007186
- for ; Fri, 4 Jan 2008 11:08:39 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m04G8d7w007184
- for source@collab.sakaiproject.org; Fri, 4 Jan 2008 11:08:39 -0500
-Date: Fri, 4 Jan 2008 11:08:39 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to gsilver@umich.edu using -f
-To: source@collab.sakaiproject.org
-From: gsilver@umich.edu
-Subject: [sakai] svn commit: r39759 - mailarchive/trunk/mailarchive-tool/tool/src/bundle
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Fri Jan 4 11:10:22 2008
-X-DSPAM-Confidence: 0.7606
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39759
-
-Author: gsilver@umich.edu
-Date: 2008-01-04 11:08:38 -0500 (Fri, 04 Jan 2008)
-New Revision: 39759
-
-Modified:
-mailarchive/trunk/mailarchive-tool/tool/src/bundle/email.properties
-Log:
-SAK-12592
-http://bugs.sakaiproject.org/jira/browse/SAK-12592
-- left moot (unused) entries commented for now
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-
-
-From wagnermr@iupui.edu Fri Jan 4 10:38:42 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.90])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Fri, 04 Jan 2008 10:38:42 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Fri, 04 Jan 2008 10:38:42 -0500
-Received: from shining.mr.itd.umich.edu (shining.mr.itd.umich.edu [141.211.93.153])
- by flawless.mail.umich.edu () with ESMTP id m04Fcfjm012313;
- Fri, 4 Jan 2008 10:38:41 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY shining.mr.itd.umich.edu ID 477E52FA.E6C6E.24093 ;
- 4 Jan 2008 10:38:37 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id 6A39594CD2;
- Fri, 4 Jan 2008 15:37:36 +0000 (GMT)
-Message-ID: <200801041537.m04Fb6Ci007092@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 690
- for ;
- Fri, 4 Jan 2008 15:37:21 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id CEFA037ACE
- for ; Fri, 4 Jan 2008 15:38:17 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m04Fb6nh007094
- for ; Fri, 4 Jan 2008 10:37:06 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m04Fb6Ci007092
- for source@collab.sakaiproject.org; Fri, 4 Jan 2008 10:37:06 -0500
-Date: Fri, 4 Jan 2008 10:37:06 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to wagnermr@iupui.edu using -f
-To: source@collab.sakaiproject.org
-From: wagnermr@iupui.edu
-Subject: [sakai] svn commit: r39758 - in gradebook/trunk: app/business/src/java/org/sakaiproject/tool/gradebook/business/impl service/api/src/java/org/sakaiproject/service/gradebook/shared service/impl/src/java/org/sakaiproject/component/gradebook
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Fri Jan 4 10:38:42 2008
-X-DSPAM-Confidence: 0.7559
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39758
-
-Author: wagnermr@iupui.edu
-Date: 2008-01-04 10:37:04 -0500 (Fri, 04 Jan 2008)
-New Revision: 39758
-
-Modified:
-gradebook/trunk/app/business/src/java/org/sakaiproject/tool/gradebook/business/impl/GradebookManagerHibernateImpl.java
-gradebook/trunk/service/api/src/java/org/sakaiproject/service/gradebook/shared/GradebookService.java
-gradebook/trunk/service/impl/src/java/org/sakaiproject/component/gradebook/GradebookServiceHibernateImpl.java
-Log:
-SAK-12175
-http://bugs.sakaiproject.org/jira/browse/SAK-12175
-Create methods required for gb integration with the Assignment2 tool
-getGradeDefinitionForStudentForItem
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-
-
-From zqian@umich.edu Fri Jan 4 10:17:43 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.97])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Fri, 04 Jan 2008 10:17:43 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Fri, 04 Jan 2008 10:17:42 -0500
-Received: from creepshow.mr.itd.umich.edu (creepshow.mr.itd.umich.edu [141.211.14.84])
- by sleepers.mail.umich.edu () with ESMTP id m04FHgfs011536;
- Fri, 4 Jan 2008 10:17:42 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY creepshow.mr.itd.umich.edu ID 477E4E0F.CCA4B.926 ;
- 4 Jan 2008 10:17:38 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id BD02DBAC64;
- Fri, 4 Jan 2008 15:17:34 +0000 (GMT)
-Message-ID: <200801041515.m04FFv42007050@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 25
- for ;
- Fri, 4 Jan 2008 15:17:11 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id 5B396236B9
- for ; Fri, 4 Jan 2008 15:17:08 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m04FFv85007052
- for ; Fri, 4 Jan 2008 10:15:57 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m04FFv42007050
- for source@collab.sakaiproject.org; Fri, 4 Jan 2008 10:15:57 -0500
-Date: Fri, 4 Jan 2008 10:15:57 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to zqian@umich.edu using -f
-To: source@collab.sakaiproject.org
-From: zqian@umich.edu
-Subject: [sakai] svn commit: r39757 - in assignment/trunk: assignment-impl/impl/src/java/org/sakaiproject/assignment/impl assignment-tool/tool/src/webapp/vm/assignment
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Fri Jan 4 10:17:42 2008
-X-DSPAM-Confidence: 0.7605
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39757
-
-Author: zqian@umich.edu
-Date: 2008-01-04 10:15:54 -0500 (Fri, 04 Jan 2008)
-New Revision: 39757
-
-Modified:
-assignment/trunk/assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssignmentService.java
-assignment/trunk/assignment-tool/tool/src/webapp/vm/assignment/chef_assignments_instructor_list_submissions.vm
-Log:
-fix to SAK-12604:Don't show groups/sections filter if the site doesn't have any
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-
-
-From antranig@caret.cam.ac.uk Fri Jan 4 10:04:14 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.25])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Fri, 04 Jan 2008 10:04:14 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Fri, 04 Jan 2008 10:04:14 -0500
-Received: from holes.mr.itd.umich.edu (holes.mr.itd.umich.edu [141.211.14.79])
- by panther.mail.umich.edu () with ESMTP id m04F4Dci015108;
- Fri, 4 Jan 2008 10:04:13 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY holes.mr.itd.umich.edu ID 477E4AE3.D7AF.31669 ;
- 4 Jan 2008 10:04:05 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id 933E3BAC17;
- Fri, 4 Jan 2008 15:04:00 +0000 (GMT)
-Message-ID: <200801041502.m04F21Jo007031@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 32
- for ;
- Fri, 4 Jan 2008 15:03:15 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id AC2F6236B9
- for ; Fri, 4 Jan 2008 15:03:12 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m04F21hn007033
- for ; Fri, 4 Jan 2008 10:02:01 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m04F21Jo007031
- for source@collab.sakaiproject.org; Fri, 4 Jan 2008 10:02:01 -0500
-Date: Fri, 4 Jan 2008 10:02:01 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to antranig@caret.cam.ac.uk using -f
-To: source@collab.sakaiproject.org
-From: antranig@caret.cam.ac.uk
-Subject: [sakai] svn commit: r39756 - in component/branches/SAK-12166/component-api/component/src/java/org/sakaiproject/component: impl impl/spring/support impl/spring/support/dynamic impl/support util
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Fri Jan 4 10:04:14 2008
-X-DSPAM-Confidence: 0.6932
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39756
-
-Author: antranig@caret.cam.ac.uk
-Date: 2008-01-04 10:01:40 -0500 (Fri, 04 Jan 2008)
-New Revision: 39756
-
-Added:
-component/branches/SAK-12166/component-api/component/src/java/org/sakaiproject/component/impl/spring/support/dynamic/
-component/branches/SAK-12166/component-api/component/src/java/org/sakaiproject/component/impl/spring/support/dynamic/DynamicComponentManager.java
-component/branches/SAK-12166/component-api/component/src/java/org/sakaiproject/component/impl/support/
-component/branches/SAK-12166/component-api/component/src/java/org/sakaiproject/component/impl/support/DynamicComponentRecord.java
-component/branches/SAK-12166/component-api/component/src/java/org/sakaiproject/component/impl/support/DynamicJARManager.java
-component/branches/SAK-12166/component-api/component/src/java/org/sakaiproject/component/impl/support/JARRecord.java
-component/branches/SAK-12166/component-api/component/src/java/org/sakaiproject/component/util/ByteToCharBase64.java
-component/branches/SAK-12166/component-api/component/src/java/org/sakaiproject/component/util/FileUtil.java
-component/branches/SAK-12166/component-api/component/src/java/org/sakaiproject/component/util/RecordFileIO.java
-component/branches/SAK-12166/component-api/component/src/java/org/sakaiproject/component/util/RecordReader.java
-component/branches/SAK-12166/component-api/component/src/java/org/sakaiproject/component/util/RecordWriter.java
-component/branches/SAK-12166/component-api/component/src/java/org/sakaiproject/component/util/StreamDigestor.java
-Modified:
-component/branches/SAK-12166/component-api/component/src/java/org/sakaiproject/component/impl/spring/support/ComponentsLoaderImpl.java
-Log:
-Temporary commit of incomplete work on JAR caching
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-
-
-From gopal.ramasammycook@gmail.com Fri Jan 4 09:05:31 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.90])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Fri, 04 Jan 2008 09:05:31 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Fri, 04 Jan 2008 09:05:31 -0500
-Received: from guys.mr.itd.umich.edu (guys.mr.itd.umich.edu [141.211.14.76])
- by flawless.mail.umich.edu () with ESMTP id m04E5U3C029277;
- Fri, 4 Jan 2008 09:05:30 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY guys.mr.itd.umich.edu ID 477E3D23.EE2E7.5237 ;
- 4 Jan 2008 09:05:26 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id 33C7856DC0;
- Fri, 4 Jan 2008 14:05:26 +0000 (GMT)
-Message-ID: <200801041403.m04E3psW006926@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 575
- for ;
- Fri, 4 Jan 2008 14:05:04 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id 3C0261D617
- for ; Fri, 4 Jan 2008 14:05:03 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m04E3pQS006928
- for ; Fri, 4 Jan 2008 09:03:52 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m04E3psW006926
- for source@collab.sakaiproject.org; Fri, 4 Jan 2008 09:03:51 -0500
-Date: Fri, 4 Jan 2008 09:03:51 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to gopal.ramasammycook@gmail.com using -f
-To: source@collab.sakaiproject.org
-From: gopal.ramasammycook@gmail.com
-Subject: [sakai] svn commit: r39755 - in sam/branches/SAK-12065: samigo-api/src/java/org/sakaiproject/tool/assessment/shared/api/grading samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/evaluation samigo-app/src/java/org/sakaiproject/tool/assessment/ui/listener/evaluation samigo-services/src/java/org/sakaiproject/tool/assessment/facade samigo-services/src/java/org/sakaiproject/tool/assessment/integration/helper/ifc samigo-services/src/java/org/sakaiproject/tool/assessment/integration/helper/integrated samigo-services/src/java/org/sakaiproject/tool/assessment/integration/helper/standalone samigo-services/src/java/org/sakaiproject/tool/assessment/shared/impl/grading
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Fri Jan 4 09:05:31 2008
-X-DSPAM-Confidence: 0.7558
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39755
-
-Author: gopal.ramasammycook@gmail.com
-Date: 2008-01-04 09:02:54 -0500 (Fri, 04 Jan 2008)
-New Revision: 39755
-
-Modified:
-sam/branches/SAK-12065/samigo-api/src/java/org/sakaiproject/tool/assessment/shared/api/grading/GradingSectionAwareServiceAPI.java
-sam/branches/SAK-12065/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/evaluation/QuestionScoresBean.java
-sam/branches/SAK-12065/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/evaluation/SubmissionStatusBean.java
-sam/branches/SAK-12065/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/evaluation/TotalScoresBean.java
-sam/branches/SAK-12065/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/listener/evaluation/SubmissionStatusListener.java
-sam/branches/SAK-12065/samigo-services/src/java/org/sakaiproject/tool/assessment/facade/PublishedAssessmentFacadeQueries.java
-sam/branches/SAK-12065/samigo-services/src/java/org/sakaiproject/tool/assessment/facade/PublishedAssessmentFacadeQueriesAPI.java
-sam/branches/SAK-12065/samigo-services/src/java/org/sakaiproject/tool/assessment/integration/helper/ifc/SectionAwareServiceHelper.java
-sam/branches/SAK-12065/samigo-services/src/java/org/sakaiproject/tool/assessment/integration/helper/integrated/SectionAwareServiceHelperImpl.java
-sam/branches/SAK-12065/samigo-services/src/java/org/sakaiproject/tool/assessment/integration/helper/standalone/SectionAwareServiceHelperImpl.java
-sam/branches/SAK-12065/samigo-services/src/java/org/sakaiproject/tool/assessment/shared/impl/grading/GradingSectionAwareServiceImpl.java
-Log:
-SAK-12065 Gopal - Samigo Group Release. SubmissionStatus/TotalScores/Questions View filter.
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-
-
-From david.horwitz@uct.ac.za Fri Jan 4 07:02:32 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.39])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Fri, 04 Jan 2008 07:02:32 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Fri, 04 Jan 2008 07:02:32 -0500
-Received: from guys.mr.itd.umich.edu (guys.mr.itd.umich.edu [141.211.14.76])
- by faithful.mail.umich.edu () with ESMTP id m04C2VN7026678;
- Fri, 4 Jan 2008 07:02:31 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY guys.mr.itd.umich.edu ID 477E2050.C2599.3263 ;
- 4 Jan 2008 07:02:27 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id 6497FBA906;
- Fri, 4 Jan 2008 12:02:11 +0000 (GMT)
-Message-ID: <200801041200.m04C0gfK006793@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 611
- for ;
- Fri, 4 Jan 2008 12:01:53 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id 5296342D3C
- for ; Fri, 4 Jan 2008 12:01:53 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m04C0gnm006795
- for ; Fri, 4 Jan 2008 07:00:42 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m04C0gfK006793
- for source@collab.sakaiproject.org; Fri, 4 Jan 2008 07:00:42 -0500
-Date: Fri, 4 Jan 2008 07:00:42 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to david.horwitz@uct.ac.za using -f
-To: source@collab.sakaiproject.org
-From: david.horwitz@uct.ac.za
-Subject: [sakai] svn commit: r39754 - in polls/branches/sakai_2-5-x: . tool tool/src/java/org/sakaiproject/poll/tool tool/src/java/org/sakaiproject/poll/tool/evolvers tool/src/webapp/WEB-INF
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Fri Jan 4 07:02:32 2008
-X-DSPAM-Confidence: 0.6526
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39754
-
-Author: david.horwitz@uct.ac.za
-Date: 2008-01-04 07:00:10 -0500 (Fri, 04 Jan 2008)
-New Revision: 39754
-
-Added:
-polls/branches/sakai_2-5-x/tool/src/java/org/sakaiproject/poll/tool/evolvers/
-polls/branches/sakai_2-5-x/tool/src/java/org/sakaiproject/poll/tool/evolvers/SakaiFCKTextEvolver.java
-Removed:
-polls/branches/sakai_2-5-x/tool/src/java/org/sakaiproject/poll/tool/evolvers/SakaiFCKTextEvolver.java
-Modified:
-polls/branches/sakai_2-5-x/.classpath
-polls/branches/sakai_2-5-x/tool/pom.xml
-polls/branches/sakai_2-5-x/tool/src/webapp/WEB-INF/requestContext.xml
-Log:
-svn log -r39753 https://source.sakaiproject.org/svn/polls/trunk
-------------------------------------------------------------------------
-r39753 | david.horwitz@uct.ac.za | 2008-01-04 13:05:51 +0200 (Fri, 04 Jan 2008) | 1 line
-
-SAK-12228 implmented workaround sugested by AB - needs to be tested against a trunk build
-------------------------------------------------------------------------
-dhorwitz@david-horwitz-6:~/branchManagemnt/sakai_2-5-x> svn merge -c39753 https://source.sakaiproject.org/svn/polls/trunk polls/
-U polls/.classpath
-A polls/tool/src/java/org/sakaiproject/poll/tool/evolvers
-A polls/tool/src/java/org/sakaiproject/poll/tool/evolvers/SakaiFCKTextEvolver.java
-C polls/tool/src/webapp/WEB-INF/requestContext.xml
-U polls/tool/pom.xml
-
-dhorwitz@david-horwitz-6:~/branchManagemnt/sakai_2-5-x> svn resolved polls/tool/src/webapp/WEB-INF/requestContext.xml
-Resolved conflicted state of 'polls/tool/src/webapp/WEB-INF/requestContext.xml
-
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-
-
-From david.horwitz@uct.ac.za Fri Jan 4 06:08:27 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.98])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Fri, 04 Jan 2008 06:08:27 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Fri, 04 Jan 2008 06:08:27 -0500
-Received: from firestarter.mr.itd.umich.edu (firestarter.mr.itd.umich.edu [141.211.14.83])
- by casino.mail.umich.edu () with ESMTP id m04B8Qw9001368;
- Fri, 4 Jan 2008 06:08:26 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY firestarter.mr.itd.umich.edu ID 477E13A5.30FC0.24054 ;
- 4 Jan 2008 06:08:23 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id 784A476D7B;
- Fri, 4 Jan 2008 11:08:12 +0000 (GMT)
-Message-ID: <200801041106.m04B6lK3006677@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 585
- for ;
- Fri, 4 Jan 2008 11:07:56 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id 1CACC42D0C
- for ; Fri, 4 Jan 2008 11:07:58 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m04B6lWM006679
- for ; Fri, 4 Jan 2008 06:06:47 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m04B6lK3006677
- for source@collab.sakaiproject.org; Fri, 4 Jan 2008 06:06:47 -0500
-Date: Fri, 4 Jan 2008 06:06:47 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to david.horwitz@uct.ac.za using -f
-To: source@collab.sakaiproject.org
-From: david.horwitz@uct.ac.za
-Subject: [sakai] svn commit: r39753 - in polls/trunk: . tool tool/src/java/org/sakaiproject/poll/tool tool/src/java/org/sakaiproject/poll/tool/evolvers tool/src/webapp/WEB-INF
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Fri Jan 4 06:08:27 2008
-X-DSPAM-Confidence: 0.6948
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39753
-
-Author: david.horwitz@uct.ac.za
-Date: 2008-01-04 06:05:51 -0500 (Fri, 04 Jan 2008)
-New Revision: 39753
-
-Added:
-polls/trunk/tool/src/java/org/sakaiproject/poll/tool/evolvers/
-polls/trunk/tool/src/java/org/sakaiproject/poll/tool/evolvers/SakaiFCKTextEvolver.java
-Modified:
-polls/trunk/.classpath
-polls/trunk/tool/pom.xml
-polls/trunk/tool/src/webapp/WEB-INF/requestContext.xml
-Log:
-SAK-12228 implmented workaround sugested by AB - needs to be tested against a trunk build
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-
-
-From david.horwitz@uct.ac.za Fri Jan 4 04:49:08 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.92])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Fri, 04 Jan 2008 04:49:08 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Fri, 04 Jan 2008 04:49:08 -0500
-Received: from galaxyquest.mr.itd.umich.edu (galaxyquest.mr.itd.umich.edu [141.211.93.145])
- by score.mail.umich.edu () with ESMTP id m049n60G017588;
- Fri, 4 Jan 2008 04:49:06 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY galaxyquest.mr.itd.umich.edu ID 477E010C.48C2.10259 ;
- 4 Jan 2008 04:49:03 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id 254CC8CDEE;
- Fri, 4 Jan 2008 09:48:55 +0000 (GMT)
-Message-ID: <200801040947.m049lUxo006517@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 246
- for ;
- Fri, 4 Jan 2008 09:48:36 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id 8C13342C92
- for ; Fri, 4 Jan 2008 09:48:40 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m049lU3P006519
- for ; Fri, 4 Jan 2008 04:47:30 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m049lUxo006517
- for source@collab.sakaiproject.org; Fri, 4 Jan 2008 04:47:30 -0500
-Date: Fri, 4 Jan 2008 04:47:30 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to david.horwitz@uct.ac.za using -f
-To: source@collab.sakaiproject.org
-From: david.horwitz@uct.ac.za
-Subject: [sakai] svn commit: r39752 - in podcasts/branches/sakai_2-5-x/podcasts-app/src/webapp: css podcasts
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Fri Jan 4 04:49:08 2008
-X-DSPAM-Confidence: 0.6528
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39752
-
-Author: david.horwitz@uct.ac.za
-Date: 2008-01-04 04:47:16 -0500 (Fri, 04 Jan 2008)
-New Revision: 39752
-
-Modified:
-podcasts/branches/sakai_2-5-x/podcasts-app/src/webapp/css/podcaster.css
-podcasts/branches/sakai_2-5-x/podcasts-app/src/webapp/podcasts/podMain.jsp
-Log:
-svn log -r39641 https://source.sakaiproject.org/svn/podcasts/trunk
-------------------------------------------------------------------------
-r39641 | josrodri@iupui.edu | 2007-12-28 23:44:24 +0200 (Fri, 28 Dec 2007) | 1 line
-
-SAK-9882: refactored podMain.jsp the right way (at least much closer to)
-------------------------------------------------------------------------
-
-dhorwitz@david-horwitz-6:~/branchManagemnt/sakai_2-5-x> svn merge -c39641 https://source.sakaiproject.org/svn/podcasts/trunk podcasts/
-C podcasts/podcasts-app/src/webapp/podcasts/podMain.jsp
-U podcasts/podcasts-app/src/webapp/css/podcaster.css
-
-conflict merged manualy
-
-
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-
-
-From david.horwitz@uct.ac.za Fri Jan 4 04:33:44 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.46])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Fri, 04 Jan 2008 04:33:44 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Fri, 04 Jan 2008 04:33:44 -0500
-Received: from workinggirl.mr.itd.umich.edu (workinggirl.mr.itd.umich.edu [141.211.93.143])
- by fan.mail.umich.edu () with ESMTP id m049Xge3031803;
- Fri, 4 Jan 2008 04:33:42 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY workinggirl.mr.itd.umich.edu ID 477DFD6C.75DBE.26054 ;
- 4 Jan 2008 04:33:35 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id 6C929BA656;
- Fri, 4 Jan 2008 09:33:27 +0000 (GMT)
-Message-ID: <200801040932.m049W2i5006493@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 153
- for ;
- Fri, 4 Jan 2008 09:33:10 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id 6C69423767
- for ; Fri, 4 Jan 2008 09:33:13 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m049W3fl006495
- for ; Fri, 4 Jan 2008 04:32:03 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m049W2i5006493
- for source@collab.sakaiproject.org; Fri, 4 Jan 2008 04:32:02 -0500
-Date: Fri, 4 Jan 2008 04:32:02 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to david.horwitz@uct.ac.za using -f
-To: source@collab.sakaiproject.org
-From: david.horwitz@uct.ac.za
-Subject: [sakai] svn commit: r39751 - in podcasts/branches/sakai_2-5-x/podcasts-app/src/webapp: css images podcasts
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Fri Jan 4 04:33:44 2008
-X-DSPAM-Confidence: 0.7002
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39751
-
-Author: david.horwitz@uct.ac.za
-Date: 2008-01-04 04:31:35 -0500 (Fri, 04 Jan 2008)
-New Revision: 39751
-
-Removed:
-podcasts/branches/sakai_2-5-x/podcasts-app/src/webapp/images/rss-feed-icon.png
-podcasts/branches/sakai_2-5-x/podcasts-app/src/webapp/podcasts/podPermissions.jsp
-Modified:
-podcasts/branches/sakai_2-5-x/podcasts-app/src/webapp/css/podcaster.css
-podcasts/branches/sakai_2-5-x/podcasts-app/src/webapp/podcasts/podDelete.jsp
-podcasts/branches/sakai_2-5-x/podcasts-app/src/webapp/podcasts/podMain.jsp
-podcasts/branches/sakai_2-5-x/podcasts-app/src/webapp/podcasts/podNoResource.jsp
-podcasts/branches/sakai_2-5-x/podcasts-app/src/webapp/podcasts/podOptions.jsp
-Log:
-svn log -r39146 https://source.sakaiproject.org/svn/podcasts/trunk
-------------------------------------------------------------------------
-r39146 | josrodri@iupui.edu | 2007-12-12 21:40:33 +0200 (Wed, 12 Dec 2007) | 1 line
-
-SAK-9882: refactored the other pages as well to take advantage of proper jsp components as well as validation cleanup.
-------------------------------------------------------------------------
-dhorwitz@david-horwitz-6:~/branchManagemnt/sakai_2-5-x> svn merge -c39146 https://source.sakaiproject.org/svn/podcasts/trunk podcasts/
-D podcasts/podcasts-app/src/webapp/podcasts/podPermissions.jsp
-U podcasts/podcasts-app/src/webapp/podcasts/podDelete.jsp
-U podcasts/podcasts-app/src/webapp/podcasts/podMain.jsp
-U podcasts/podcasts-app/src/webapp/podcasts/podNoResource.jsp
-U podcasts/podcasts-app/src/webapp/podcasts/podOptions.jsp
-D podcasts/podcasts-app/src/webapp/images/rss-feed-icon.png
-U podcasts/podcasts-app/src/webapp/css/podcaster.css
-
-
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-
-
-From stephen.marquard@uct.ac.za Fri Jan 4 04:07:34 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.25])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Fri, 04 Jan 2008 04:07:34 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Fri, 04 Jan 2008 04:07:34 -0500
-Received: from salemslot.mr.itd.umich.edu (salemslot.mr.itd.umich.edu [141.211.14.58])
- by panther.mail.umich.edu () with ESMTP id m0497WAN027902;
- Fri, 4 Jan 2008 04:07:32 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY salemslot.mr.itd.umich.edu ID 477DF74E.49493.30415 ;
- 4 Jan 2008 04:07:29 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id 88598BA5B6;
- Fri, 4 Jan 2008 09:07:19 +0000 (GMT)
-Message-ID: <200801040905.m0495rWB006420@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 385
- for ;
- Fri, 4 Jan 2008 09:07:04 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id 90636418A8
- for ; Fri, 4 Jan 2008 09:07:04 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m0495sZs006422
- for ; Fri, 4 Jan 2008 04:05:54 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m0495rWB006420
- for source@collab.sakaiproject.org; Fri, 4 Jan 2008 04:05:53 -0500
-Date: Fri, 4 Jan 2008 04:05:53 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to stephen.marquard@uct.ac.za using -f
-To: source@collab.sakaiproject.org
-From: stephen.marquard@uct.ac.za
-Subject: [sakai] svn commit: r39750 - event/branches/SAK-6216/event-util/util/src/java/org/sakaiproject/util
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Fri Jan 4 04:07:34 2008
-X-DSPAM-Confidence: 0.7554
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39750
-
-Author: stephen.marquard@uct.ac.za
-Date: 2008-01-04 04:05:43 -0500 (Fri, 04 Jan 2008)
-New Revision: 39750
-
-Modified:
-event/branches/SAK-6216/event-util/util/src/java/org/sakaiproject/util/EmailNotification.java
-Log:
-SAK-6216 merge event change from SAK-11169 (r39033) to synchronize branch with 2-5-x (for convenience for UCT local build)
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-
-
-From louis@media.berkeley.edu Thu Jan 3 19:51:21 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.91])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Thu, 03 Jan 2008 19:51:21 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Thu, 03 Jan 2008 19:51:21 -0500
-Received: from eyewitness.mr.itd.umich.edu (eyewitness.mr.itd.umich.edu [141.211.93.142])
- by jacknife.mail.umich.edu () with ESMTP id m040pJHB027171;
- Thu, 3 Jan 2008 19:51:19 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY eyewitness.mr.itd.umich.edu ID 477D8300.AC098.32562 ;
- 3 Jan 2008 19:51:15 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id E6CC4B9F8A;
- Fri, 4 Jan 2008 00:36:06 +0000 (GMT)
-Message-ID: <200801040023.m040NpCc005473@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 754
- for ;
- Fri, 4 Jan 2008 00:35:43 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id 8889842C49
- for ; Fri, 4 Jan 2008 00:25:00 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m040NpgM005475
- for ; Thu, 3 Jan 2008 19:23:51 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m040NpCc005473
- for source@collab.sakaiproject.org; Thu, 3 Jan 2008 19:23:51 -0500
-Date: Thu, 3 Jan 2008 19:23:51 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to louis@media.berkeley.edu using -f
-To: source@collab.sakaiproject.org
-From: louis@media.berkeley.edu
-Subject: [sakai] svn commit: r39749 - in bspace/site-manage/sakai_2-4-x/site-manage-tool/tool/src: bundle webapp/vm/sitesetup
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Thu Jan 3 19:51:20 2008
-X-DSPAM-Confidence: 0.6956
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39749
-
-Author: louis@media.berkeley.edu
-Date: 2008-01-03 19:23:46 -0500 (Thu, 03 Jan 2008)
-New Revision: 39749
-
-Modified:
-bspace/site-manage/sakai_2-4-x/site-manage-tool/tool/src/bundle/sitesetupgeneric.properties
-bspace/site-manage/sakai_2-4-x/site-manage-tool/tool/src/webapp/vm/sitesetup/chef_site-importSites.vm
-Log:
-BSP-1420 Update text to clarify "Re-Use Materials..." option in WS Setup
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-
-
-From louis@media.berkeley.edu Thu Jan 3 17:18:23 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.91])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Thu, 03 Jan 2008 17:18:23 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Thu, 03 Jan 2008 17:18:23 -0500
-Received: from salemslot.mr.itd.umich.edu (salemslot.mr.itd.umich.edu [141.211.14.58])
- by jacknife.mail.umich.edu () with ESMTP id m03MIMXY027729;
- Thu, 3 Jan 2008 17:18:22 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY salemslot.mr.itd.umich.edu ID 477D5F23.797F6.16348 ;
- 3 Jan 2008 17:18:14 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id EF439B98CE;
- Thu, 3 Jan 2008 22:18:19 +0000 (GMT)
-Message-ID: <200801032216.m03MGhDa005292@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 236
- for ;
- Thu, 3 Jan 2008 22:18:04 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id 905D53C2FD
- for ; Thu, 3 Jan 2008 22:17:52 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m03MGhrs005294
- for ; Thu, 3 Jan 2008 17:16:43 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m03MGhDa005292
- for source@collab.sakaiproject.org; Thu, 3 Jan 2008 17:16:43 -0500
-Date: Thu, 3 Jan 2008 17:16:43 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to louis@media.berkeley.edu using -f
-To: source@collab.sakaiproject.org
-From: louis@media.berkeley.edu
-Subject: [sakai] svn commit: r39746 - in bspace/site-manage/sakai_2-4-x/site-manage-tool/tool/src: bundle webapp/vm/sitesetup
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Thu Jan 3 17:18:23 2008
-X-DSPAM-Confidence: 0.6959
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39746
-
-Author: louis@media.berkeley.edu
-Date: 2008-01-03 17:16:39 -0500 (Thu, 03 Jan 2008)
-New Revision: 39746
-
-Modified:
-bspace/site-manage/sakai_2-4-x/site-manage-tool/tool/src/bundle/sitesetupgeneric.properties
-bspace/site-manage/sakai_2-4-x/site-manage-tool/tool/src/webapp/vm/sitesetup/chef_site-siteInfo-duplicate.vm
-Log:
-BSP-1421 Add text to clarify "Duplicate Site" option in Site Info
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-
-
-From ray@media.berkeley.edu Thu Jan 3 17:07:00 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.39])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Thu, 03 Jan 2008 17:07:00 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Thu, 03 Jan 2008 17:07:00 -0500
-Received: from anniehall.mr.itd.umich.edu (anniehall.mr.itd.umich.edu [141.211.93.141])
- by faithful.mail.umich.edu () with ESMTP id m03M6xaq014868;
- Thu, 3 Jan 2008 17:06:59 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY anniehall.mr.itd.umich.edu ID 477D5C7A.4FE1F.22211 ;
- 3 Jan 2008 17:06:53 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id 0BC8D7225E;
- Thu, 3 Jan 2008 22:06:57 +0000 (GMT)
-Message-ID: <200801032205.m03M5Ea7005273@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 554
- for ;
- Thu, 3 Jan 2008 22:06:34 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id 2AB513C2FD
- for ; Thu, 3 Jan 2008 22:06:23 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m03M5EQa005275
- for ; Thu, 3 Jan 2008 17:05:14 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m03M5Ea7005273
- for source@collab.sakaiproject.org; Thu, 3 Jan 2008 17:05:14 -0500
-Date: Thu, 3 Jan 2008 17:05:14 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to ray@media.berkeley.edu using -f
-To: source@collab.sakaiproject.org
-From: ray@media.berkeley.edu
-Subject: [sakai] svn commit: r39745 - providers/trunk/cm/cm-authz-provider/src/java/org/sakaiproject/coursemanagement/impl/provider
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Thu Jan 3 17:07:00 2008
-X-DSPAM-Confidence: 0.7556
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39745
-
-Author: ray@media.berkeley.edu
-Date: 2008-01-03 17:05:11 -0500 (Thu, 03 Jan 2008)
-New Revision: 39745
-
-Modified:
-providers/trunk/cm/cm-authz-provider/src/java/org/sakaiproject/coursemanagement/impl/provider/CourseManagementGroupProvider.java
-Log:
-SAK-12602 Fix logic when a user has multiple roles in a section
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-
-
-From cwen@iupui.edu Thu Jan 3 16:34:40 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.34])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Thu, 03 Jan 2008 16:34:40 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Thu, 03 Jan 2008 16:34:40 -0500
-Received: from icestorm.mr.itd.umich.edu (icestorm.mr.itd.umich.edu [141.211.93.149])
- by chaos.mail.umich.edu () with ESMTP id m03LYdY1029538;
- Thu, 3 Jan 2008 16:34:39 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY icestorm.mr.itd.umich.edu ID 477D54EA.13F34.26602 ;
- 3 Jan 2008 16:34:36 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id CC710ADC79;
- Thu, 3 Jan 2008 21:34:29 +0000 (GMT)
-Message-ID: <200801032133.m03LX3gG005191@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 611
- for ;
- Thu, 3 Jan 2008 21:34:08 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id 43C4242B55
- for ; Thu, 3 Jan 2008 21:34:12 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m03LX3Vb005193
- for ; Thu, 3 Jan 2008 16:33:03 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m03LX3gG005191
- for source@collab.sakaiproject.org; Thu, 3 Jan 2008 16:33:03 -0500
-Date: Thu, 3 Jan 2008 16:33:03 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to cwen@iupui.edu using -f
-To: source@collab.sakaiproject.org
-From: cwen@iupui.edu
-Subject: [sakai] svn commit: r39744 - oncourse/branches/oncourse_OPC_122007
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Thu Jan 3 16:34:40 2008
-X-DSPAM-Confidence: 0.9846
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39744
-
-Author: cwen@iupui.edu
-Date: 2008-01-03 16:33:02 -0500 (Thu, 03 Jan 2008)
-New Revision: 39744
-
-Modified:
-oncourse/branches/oncourse_OPC_122007/
-oncourse/branches/oncourse_OPC_122007/.externals
-Log:
-update external for GB.
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-
-
-From cwen@iupui.edu Thu Jan 3 16:29:07 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.46])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Thu, 03 Jan 2008 16:29:07 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Thu, 03 Jan 2008 16:29:07 -0500
-Received: from galaxyquest.mr.itd.umich.edu (galaxyquest.mr.itd.umich.edu [141.211.93.145])
- by fan.mail.umich.edu () with ESMTP id m03LT6uw027749;
- Thu, 3 Jan 2008 16:29:06 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY galaxyquest.mr.itd.umich.edu ID 477D5397.E161D.20326 ;
- 3 Jan 2008 16:28:58 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id DEC65ADC79;
- Thu, 3 Jan 2008 21:28:52 +0000 (GMT)
-Message-ID: <200801032127.m03LRUqH005177@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 917
- for ;
- Thu, 3 Jan 2008 21:28:39 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id 1FBB042B30
- for ; Thu, 3 Jan 2008 21:28:38 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m03LRUk4005179
- for ; Thu, 3 Jan 2008 16:27:30 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m03LRUqH005177
- for source@collab.sakaiproject.org; Thu, 3 Jan 2008 16:27:30 -0500
-Date: Thu, 3 Jan 2008 16:27:30 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to cwen@iupui.edu using -f
-To: source@collab.sakaiproject.org
-From: cwen@iupui.edu
-Subject: [sakai] svn commit: r39743 - gradebook/branches/oncourse_2-4-2/app/ui/src/java/org/sakaiproject/tool/gradebook/ui
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Thu Jan 3 16:29:07 2008
-X-DSPAM-Confidence: 0.8509
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39743
-
-Author: cwen@iupui.edu
-Date: 2008-01-03 16:27:29 -0500 (Thu, 03 Jan 2008)
-New Revision: 39743
-
-Modified:
-gradebook/branches/oncourse_2-4-2/app/ui/src/java/org/sakaiproject/tool/gradebook/ui/RosterBean.java
-Log:
-svn merge -c 39403 https://source.sakaiproject.org/svn/gradebook/trunk
-U app/ui/src/java/org/sakaiproject/tool/gradebook/ui/RosterBean.java
-
-svn log -r 39403 https://source.sakaiproject.org/svn/gradebook/trunk
-------------------------------------------------------------------------
-r39403 | wagnermr@iupui.edu | 2007-12-17 17:11:08 -0500 (Mon, 17 Dec 2007) | 3 lines
-
-SAK-12504
-http://jira.sakaiproject.org/jira/browse/SAK-12504
-Viewing "All Grades" page as a TA with grader permissions causes stack trace
-------------------------------------------------------------------------
-
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
-
-
-
-From cwen@iupui.edu Thu Jan 3 16:23:48 2008
-Return-Path:
-Received: from murder (mail.umich.edu [141.211.14.91])
- by frankenstein.mail.umich.edu (Cyrus v2.3.8) with LMTPA;
- Thu, 03 Jan 2008 16:23:48 -0500
-X-Sieve: CMU Sieve 2.3
-Received: from murder ([unix socket])
- by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
- Thu, 03 Jan 2008 16:23:48 -0500
-Received: from salemslot.mr.itd.umich.edu (salemslot.mr.itd.umich.edu [141.211.14.58])
- by jacknife.mail.umich.edu () with ESMTP id m03LNlf0002115;
- Thu, 3 Jan 2008 16:23:47 -0500
-Received: FROM paploo.uhi.ac.uk (app1.prod.collab.uhi.ac.uk [194.35.219.184])
- BY salemslot.mr.itd.umich.edu ID 477D525E.1448.30389 ;
- 3 Jan 2008 16:23:44 -0500
-Received: from paploo.uhi.ac.uk (localhost [127.0.0.1])
- by paploo.uhi.ac.uk (Postfix) with ESMTP id 9D005B9D06;
- Thu, 3 Jan 2008 21:23:38 +0000 (GMT)
-Message-ID: <200801032122.m03LMFo4005148@nakamura.uits.iupui.edu>
-Mime-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Received: from prod.collab.uhi.ac.uk ([194.35.219.182])
- by paploo.uhi.ac.uk (JAMES SMTP Server 2.1.3) with SMTP ID 6
- for ;
- Thu, 3 Jan 2008 21:23:24 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (nakamura.uits.iupui.edu [134.68.220.122])
- by shmi.uhi.ac.uk (Postfix) with ESMTP id 3535542B69
- for ; Thu, 3 Jan 2008 21:23:24 +0000 (GMT)
-Received: from nakamura.uits.iupui.edu (localhost [127.0.0.1])
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11) with ESMTP id m03LMFtT005150
- for ; Thu, 3 Jan 2008 16:22:15 -0500
-Received: (from apache@localhost)
- by nakamura.uits.iupui.edu (8.12.11.20060308/8.12.11/Submit) id m03LMFo4005148
- for source@collab.sakaiproject.org; Thu, 3 Jan 2008 16:22:15 -0500
-Date: Thu, 3 Jan 2008 16:22:15 -0500
-X-Authentication-Warning: nakamura.uits.iupui.edu: apache set sender to cwen@iupui.edu using -f
-To: source@collab.sakaiproject.org
-From: cwen@iupui.edu
-Subject: [sakai] svn commit: r39742 - gradebook/branches/oncourse_2-4-2/app/ui/src/java/org/sakaiproject/tool/gradebook/ui
-X-Content-Type-Outer-Envelope: text/plain; charset=UTF-8
-X-Content-Type-Message-Body: text/plain; charset=UTF-8
-Content-Type: text/plain; charset=UTF-8
-X-DSPAM-Result: Innocent
-X-DSPAM-Processed: Thu Jan 3 16:23:48 2008
-X-DSPAM-Confidence: 0.9907
-X-DSPAM-Probability: 0.0000
-
-Details: http://source.sakaiproject.org/viewsvn/?view=rev&rev=39742
-
-Author: cwen@iupui.edu
-Date: 2008-01-03 16:22:14 -0500 (Thu, 03 Jan 2008)
-New Revision: 39742
-
-Modified:
-gradebook/branches/oncourse_2-4-2/app/ui/src/java/org/sakaiproject/tool/gradebook/ui/RosterBean.java
-Log:
-svn merge -c 35014 https://source.sakaiproject.org/svn/gradebook/trunk
-U app/ui/src/java/org/sakaiproject/tool/gradebook/ui/RosterBean.java
-
-svn log -r 35014 https://source.sakaiproject.org/svn/gradebook/trunk
-------------------------------------------------------------------------
-r35014 | wagnermr@iupui.edu | 2007-09-12 16:17:59 -0400 (Wed, 12 Sep 2007) | 3 lines
-
-SAK-11458
-http://bugs.sakaiproject.org/jira/browse/SAK-11458
-Course grade does not appear on "All Grades" page if no categories in gb
-------------------------------------------------------------------------
-
-
-----------------------
-This automatic notification message was sent by Sakai Collab (https://collab.sakaiproject.org/portal) from the Source site.
-You can modify how you receive notifications at My Workspace > Preferences.
diff --git a/Flask Oauth/flask_server.py b/Flask Oauth/flask_server.py
deleted file mode 100644
index b04e563..0000000
--- a/Flask Oauth/flask_server.py
+++ /dev/null
@@ -1,104 +0,0 @@
-import time
-import requests
-from urllib.parse import urlencode
-
-from flask import Flask, request, url_for, jsonify, abort, redirect
-
-from oauth_config import oauth_config
-
-app = Flask(__name__)
-
-
-@app.route('/')
-@app.route('/login')
-def login():
- return f'''
- OAuth
-
-
-
-
-
-
- OIDC
-
- '''
-
-
-@app.route('/login/')
-def oauth_login(provider):
- try:
- auth_uri = oauth_config[provider]['auth_uri']
- params = oauth_config[provider]['auth_params']
-
- params.update({'state': str(time.time()),
- 'redirect_uri': url_for('.oauth_login_callback', provider=provider, _external=True)})
- qs = urlencode(params)
-
- login_url = auth_uri + '?' + qs
- return redirect(login_url)
- except KeyError:
- abort(404)
-
-
-@app.route('/login//callback')
-def oauth_login_callback(provider):
- try:
- token_uri = oauth_config[provider]['token_uri']
- params = oauth_config[provider]['token_params']
- params.update({'code': request.args.get('code'),
- 'state': request.args.get('state', ''),
- 'scope': request.args.get('scope', ''),
- 'redirect_uri': url_for('.oauth_login_callback', provider=provider, _external=True)})
-
- resp = requests.post(token_uri, data=params)
- data = resp.json()
-
- return jsonify(data)
- except KeyError:
- abort(404)
-
-
-@app.route('/oauth//me')
-def oauth_me(provider):
- access_token = request.args.get('access_token')
- headers = {'Authorization': f'Bearer {access_token}'}
- try:
- me_uri = oauth_config[provider]['me_uri']
- resp = requests.get(me_uri, headers=headers)
- me_resp = resp.json()
- return jsonify(me_resp)
- except KeyError:
- abort(404)
-
-
-@app.route('/login/oidc/')
-def oidc_login(provider):
- try:
- auth_uri = oauth_config[provider]['auth_uri']
- params = {
- # 'response_type': 'token+id_token',
- 'response_type': 'token',
- 'client_id': oauth_config[provider]['token_params']['client_id'],
- 'redirect_uri': url_for('oidc_login_callback', provider=provider, _external=True),
- 'scope': '+'.join(['openid'])
- }
-
- login_url = auth_uri + '?' + '&'.join([f'{k}={v}' for k, v in params.items()])
- return redirect(login_url)
- except KeyError:
- abort(404)
-
-
-@app.route('/login/oidc//callback')
-def oidc_login_callback(provider):
- print(request.url)
- print(request.pragma)
- print(request.full_path)
- print(request.path)
-
- return str(request.url)
-
-
-if __name__ == '__main__':
- app.run(debug=True)
diff --git a/Flask Oauth/oauth_config.py b/Flask Oauth/oauth_config.py
deleted file mode 100644
index ca2e3ed..0000000
--- a/Flask Oauth/oauth_config.py
+++ /dev/null
@@ -1,128 +0,0 @@
-"""
-google https://developers.google.com/identity/protocols/OAuth2WebServer
-naver https://developers.naver.com/docs/login/api/
-kakao https://developers.kakao.com/docs/restapi/user-management
-facebook https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow
-twitch https://dev.twitch.tv/docs/authentication/getting-tokens-oidc#oidc-authorization-code-flow
-"""
-
-import settings
-
-
-def gen_oauth_scope(provider, scopes):
- if type(scopes) == str:
- pass
- elif type(scopes) == list:
- if provider == 'google':
- scopes = ' '.join(scopes)
- elif provider == 'kakao':
- scopes = ','.join(scopes)
- elif provider == 'twitch':
- scopes = '' # FIXME
- else:
- scopes = ''.join(scopes)
- return scopes
-
-
-oauth_config = {
- 'google': {
- 'auth_uri': 'https://accounts.google.com/o/oauth2/auth',
- 'token_uri': 'https://oauth2.googleapis.com/token',
- 'me_uri': 'https://www.googleapis.com/oauth2/v1/userinfo',
- 'auth_params': {
- 'state': '',
- 'redirect_uri': '',
- 'client_id': settings.google_client_id,
- 'scope': gen_oauth_scope('google', ['https://www.googleapis.com/auth/userinfo.profile',
- 'https://www.googleapis.com/auth/userinfo.email',
- # 'https://www.googleapis.com/auth/youtube.force-ssl',
- # 'https://www.googleapis.com/auth/drive.metadata.readonly',
- ]),
- 'access_type': 'offline',
- 'include_granted_scopes': 'true',
- 'response_type': 'code'
- },
- 'token_params': {
- 'code': '', 'scope': '', 'state': '', # from request.args
- 'redirect_uri': '',
- 'client_id': settings.google_client_id,
- 'client_secret': settings.google_client_secret,
- 'grant_type': 'authorization_code'
- }
- },
- 'kakao': {
- 'auth_uri': 'https://kauth.kakao.com/oauth/authorize',
- 'token_uri': 'https://kauth.kakao.com/oauth/token',
- 'me_uri': 'https://kapi.kakao.com/v1/user/me',
- 'auth_params': {
- 'state': '',
- 'redirect_uri': '',
- 'client_id': settings.kakao_client_id,
- 'response_type': 'code',
- 'encode_state': 1,
- },
- 'token_params': {
- 'code': '',
- 'redirect_uri': '',
- 'client_id': settings.kakao_client_id,
- 'client_secret': settings.kakao_client_secret,
- 'grant_type': 'authorization_code',
- }
- },
- 'naver': {
- 'auth_uri': 'https://nid.naver.com/oauth2.0/authorize',
- 'token_uri': 'https://nid.naver.com/oauth2.0/token',
- 'me_uri': 'https://openapi.naver.com/v1/nid/me',
- 'auth_params': {
- 'scope': gen_oauth_scope('naver', ''),
- 'redirect_uri': '',
- 'client_id': settings.naver_client_id,
- 'state': '',
- 'response_type': 'code',
- },
- 'token_params': {
- 'code': '', 'state': '',
- 'client_id': settings.naver_client_id,
- 'client_secret': settings.naver_client_secret,
- 'grant_type': 'authorization_code',
- }
- },
- 'facebook': {
- 'auth_uri': 'https://graph.facebook.com/oauth/authorize',
- 'token_uri': 'https://graph.facebook.com/oauth/access_token',
- 'me_uri': 'https://graph.facebook.com/me',
- 'auth_params': {
- 'state': '',
- 'redirect_uri': '',
- 'client_id': settings.facebook_client_id,
- 'scope': gen_oauth_scope('facebook', []),
- 'response_type': 'code',
- },
- 'token_params': {
- 'code': '', 'scope': '', 'state': '',
- 'redirect_uri': '',
- 'client_id': settings.facebook_client_id,
- 'client_secret': settings.facebook_client_secret,
- 'grant_type': 'authorization_code',
- }
- },
- 'twitch': {
- 'auth_uri': 'https://id.twitch.tv/oauth2/authorize',
- 'token_uri': 'https://id.twitch.tv/oauth2/token',
- 'me_uri': '',
- 'auth_params': {
- 'state': '',
- 'redirect_uri': '',
- 'client_id': settings.twitch_client_id,
- 'scope': gen_oauth_scope('twitch', []),
- 'response_type': 'code',
- },
- 'token_params': {
- 'code': '', 'scope': '', 'state': '',
- 'redirect_uri': '',
- 'client_id': settings.twitch_client_id,
- 'client_secret': settings.twitch_client_secret,
- 'grant_type': 'authorization_code',
- }
- }
-}
diff --git a/Flask Oauth/readme.md b/Flask Oauth/readme.md
deleted file mode 100644
index 6c5085c..0000000
--- a/Flask Oauth/readme.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# Flask Oauth
-
-$ python flask_server.py
-
-# Open http://127.0.0.1:5000
diff --git a/Flask Oauth/requirements.txt b/Flask Oauth/requirements.txt
deleted file mode 100644
index 99e2210..0000000
--- a/Flask Oauth/requirements.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-flask==1.1.1
-requests==2.25.1
diff --git a/Flask Oauth/settings.sample.py b/Flask Oauth/settings.sample.py
deleted file mode 100644
index e68b804..0000000
--- a/Flask Oauth/settings.sample.py
+++ /dev/null
@@ -1,15 +0,0 @@
-google_client_id = ''
-google_client_secret = ''
-
-kakao_client_id = ''
-kakao_client_secret = ''
-
-naver_client_id = ''
-naver_client_secret = ''
-
-facebook_client_id = ''
-facebook_client_secret = ''
-
-twitch_client_id = ''
-twitch_client_secret = ''
-
diff --git a/Hack.py b/Hack.py
deleted file mode 100644
index 1e43d5f..0000000
--- a/Hack.py
+++ /dev/null
@@ -1,28 +0,0 @@
-import hashlib
-import re
-import fileinput
-
-n = input('Enter Filename: ');
-f = open(n, 'r')
-
-for line in f:
-
- p = line.strip()
-
- if len(p) < 6:
- print(p + " not valid")
- continue
-
- h = hashlib.sha1(p).hexdigest()[6:]
-
- passwords = open('combo_not.txt', 'r')
- found = False
-
- for password in passwords:
- if re.search(h,password):
- print(p + " found")
- found = True
- break
-
- if not found:
- print(p + " *NOT* found")
\ No newline at end of file
diff --git a/MARIO-BROS/.vscode/settings.json b/MARIO-BROS/.vscode/settings.json
deleted file mode 100644
index b1a983a..0000000
--- a/MARIO-BROS/.vscode/settings.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "vscode-corda.isCordaProject": false,
- "cSpell.words": [
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
- "centerx",
- "enemey",
- "frams",
- "groupid",
- "KEYUP",
- "KOOPA",
- "powerup",
- "rects",
- "sefl"
- ]
-}
\ No newline at end of file
diff --git a/MARIO-BROS/main.py b/MARIO-BROS/main.py
deleted file mode 100644
index 9421809..0000000
--- a/MARIO-BROS/main.py
+++ /dev/null
@@ -1,6 +0,0 @@
-import pygame as pg
-from source.main import main
-
-if __name__=='__main__':
- main()
- pg.quit()
\ No newline at end of file
diff --git a/MARIO-BROS/resources/demo/level_1_1.png b/MARIO-BROS/resources/demo/level_1_1.png
deleted file mode 100644
index 3da668e..0000000
Binary files a/MARIO-BROS/resources/demo/level_1_1.png and /dev/null differ
diff --git a/MARIO-BROS/resources/demo/level_1_2.png b/MARIO-BROS/resources/demo/level_1_2.png
deleted file mode 100644
index 03a84b5..0000000
Binary files a/MARIO-BROS/resources/demo/level_1_2.png and /dev/null differ
diff --git a/MARIO-BROS/resources/demo/level_1_3.png b/MARIO-BROS/resources/demo/level_1_3.png
deleted file mode 100644
index 82cd120..0000000
Binary files a/MARIO-BROS/resources/demo/level_1_3.png and /dev/null differ
diff --git a/MARIO-BROS/resources/demo/level_1_4.png b/MARIO-BROS/resources/demo/level_1_4.png
deleted file mode 100644
index 3b5523f..0000000
Binary files a/MARIO-BROS/resources/demo/level_1_4.png and /dev/null differ
diff --git a/MARIO-BROS/resources/graphics/enemies.png b/MARIO-BROS/resources/graphics/enemies.png
deleted file mode 100644
index 67ae770..0000000
Binary files a/MARIO-BROS/resources/graphics/enemies.png and /dev/null differ
diff --git a/MARIO-BROS/resources/graphics/item_objects.png b/MARIO-BROS/resources/graphics/item_objects.png
deleted file mode 100644
index 0247be4..0000000
Binary files a/MARIO-BROS/resources/graphics/item_objects.png and /dev/null differ
diff --git a/MARIO-BROS/resources/graphics/level_1.png b/MARIO-BROS/resources/graphics/level_1.png
deleted file mode 100644
index eac10cd..0000000
Binary files a/MARIO-BROS/resources/graphics/level_1.png and /dev/null differ
diff --git a/MARIO-BROS/resources/graphics/level_2.png b/MARIO-BROS/resources/graphics/level_2.png
deleted file mode 100644
index 9b17558..0000000
Binary files a/MARIO-BROS/resources/graphics/level_2.png and /dev/null differ
diff --git a/MARIO-BROS/resources/graphics/level_3.png b/MARIO-BROS/resources/graphics/level_3.png
deleted file mode 100644
index 5715650..0000000
Binary files a/MARIO-BROS/resources/graphics/level_3.png and /dev/null differ
diff --git a/MARIO-BROS/resources/graphics/level_4.png b/MARIO-BROS/resources/graphics/level_4.png
deleted file mode 100644
index 83270c8..0000000
Binary files a/MARIO-BROS/resources/graphics/level_4.png and /dev/null differ
diff --git a/MARIO-BROS/resources/graphics/mario_bros.png b/MARIO-BROS/resources/graphics/mario_bros.png
deleted file mode 100644
index 2325110..0000000
Binary files a/MARIO-BROS/resources/graphics/mario_bros.png and /dev/null differ
diff --git a/MARIO-BROS/resources/graphics/smb_enemies_sheet.png b/MARIO-BROS/resources/graphics/smb_enemies_sheet.png
deleted file mode 100644
index fd52a5e..0000000
Binary files a/MARIO-BROS/resources/graphics/smb_enemies_sheet.png and /dev/null differ
diff --git a/MARIO-BROS/resources/graphics/text_images.png b/MARIO-BROS/resources/graphics/text_images.png
deleted file mode 100644
index cf0d28f..0000000
Binary files a/MARIO-BROS/resources/graphics/text_images.png and /dev/null differ
diff --git a/MARIO-BROS/resources/graphics/tile_set.png b/MARIO-BROS/resources/graphics/tile_set.png
deleted file mode 100644
index 01df713..0000000
Binary files a/MARIO-BROS/resources/graphics/tile_set.png and /dev/null differ
diff --git a/MARIO-BROS/resources/graphics/title_screen.png b/MARIO-BROS/resources/graphics/title_screen.png
deleted file mode 100644
index c2c7b5d..0000000
Binary files a/MARIO-BROS/resources/graphics/title_screen.png and /dev/null differ
diff --git a/MARIO-BROS/source/__init__.py b/MARIO-BROS/source/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/MARIO-BROS/source/__pycache__/__init__.cpython-39.pyc b/MARIO-BROS/source/__pycache__/__init__.cpython-39.pyc
deleted file mode 100644
index f3ea153..0000000
Binary files a/MARIO-BROS/source/__pycache__/__init__.cpython-39.pyc and /dev/null differ
diff --git a/MARIO-BROS/source/__pycache__/constants.cpython-39.pyc b/MARIO-BROS/source/__pycache__/constants.cpython-39.pyc
deleted file mode 100644
index 916df14..0000000
Binary files a/MARIO-BROS/source/__pycache__/constants.cpython-39.pyc and /dev/null differ
diff --git a/MARIO-BROS/source/__pycache__/main.cpython-39.pyc b/MARIO-BROS/source/__pycache__/main.cpython-39.pyc
deleted file mode 100644
index 3b83c99..0000000
Binary files a/MARIO-BROS/source/__pycache__/main.cpython-39.pyc and /dev/null differ
diff --git a/MARIO-BROS/source/__pycache__/setup.cpython-39.pyc b/MARIO-BROS/source/__pycache__/setup.cpython-39.pyc
deleted file mode 100644
index 1dbbe04..0000000
Binary files a/MARIO-BROS/source/__pycache__/setup.cpython-39.pyc and /dev/null differ
diff --git a/MARIO-BROS/source/__pycache__/tools.cpython-39.pyc b/MARIO-BROS/source/__pycache__/tools.cpython-39.pyc
deleted file mode 100644
index ab643a1..0000000
Binary files a/MARIO-BROS/source/__pycache__/tools.cpython-39.pyc and /dev/null differ
diff --git a/MARIO-BROS/source/components/__init__.py b/MARIO-BROS/source/components/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/MARIO-BROS/source/components/__pycache__/__init__.cpython-39.pyc b/MARIO-BROS/source/components/__pycache__/__init__.cpython-39.pyc
deleted file mode 100644
index f11896a..0000000
Binary files a/MARIO-BROS/source/components/__pycache__/__init__.cpython-39.pyc and /dev/null differ
diff --git a/MARIO-BROS/source/components/__pycache__/box.cpython-39.pyc b/MARIO-BROS/source/components/__pycache__/box.cpython-39.pyc
deleted file mode 100644
index 9da508c..0000000
Binary files a/MARIO-BROS/source/components/__pycache__/box.cpython-39.pyc and /dev/null differ
diff --git a/MARIO-BROS/source/components/__pycache__/brick.cpython-39.pyc b/MARIO-BROS/source/components/__pycache__/brick.cpython-39.pyc
deleted file mode 100644
index 127f3e4..0000000
Binary files a/MARIO-BROS/source/components/__pycache__/brick.cpython-39.pyc and /dev/null differ
diff --git a/MARIO-BROS/source/components/__pycache__/coin.cpython-39.pyc b/MARIO-BROS/source/components/__pycache__/coin.cpython-39.pyc
deleted file mode 100644
index a9e46d1..0000000
Binary files a/MARIO-BROS/source/components/__pycache__/coin.cpython-39.pyc and /dev/null differ
diff --git a/MARIO-BROS/source/components/__pycache__/enemy.cpython-39.pyc b/MARIO-BROS/source/components/__pycache__/enemy.cpython-39.pyc
deleted file mode 100644
index 6f8cab4..0000000
Binary files a/MARIO-BROS/source/components/__pycache__/enemy.cpython-39.pyc and /dev/null differ
diff --git a/MARIO-BROS/source/components/__pycache__/info.cpython-39.pyc b/MARIO-BROS/source/components/__pycache__/info.cpython-39.pyc
deleted file mode 100644
index b27d663..0000000
Binary files a/MARIO-BROS/source/components/__pycache__/info.cpython-39.pyc and /dev/null differ
diff --git a/MARIO-BROS/source/components/__pycache__/player.cpython-39.pyc b/MARIO-BROS/source/components/__pycache__/player.cpython-39.pyc
deleted file mode 100644
index f22eaa5..0000000
Binary files a/MARIO-BROS/source/components/__pycache__/player.cpython-39.pyc and /dev/null differ
diff --git a/MARIO-BROS/source/components/__pycache__/powerup.cpython-39.pyc b/MARIO-BROS/source/components/__pycache__/powerup.cpython-39.pyc
deleted file mode 100644
index fdf0001..0000000
Binary files a/MARIO-BROS/source/components/__pycache__/powerup.cpython-39.pyc and /dev/null differ
diff --git a/MARIO-BROS/source/components/__pycache__/stuff.cpython-39.pyc b/MARIO-BROS/source/components/__pycache__/stuff.cpython-39.pyc
deleted file mode 100644
index 4bc75e5..0000000
Binary files a/MARIO-BROS/source/components/__pycache__/stuff.cpython-39.pyc and /dev/null differ
diff --git a/MARIO-BROS/source/components/box.py b/MARIO-BROS/source/components/box.py
deleted file mode 100644
index 53dc023..0000000
--- a/MARIO-BROS/source/components/box.py
+++ /dev/null
@@ -1,79 +0,0 @@
-import pygame as pg
-from .. import setup, tools
-from .. import constants as c
-from . import coin, powerup
-
-
-class Box(pg.sprite.Sprite):
- def __init__(self, x, y, type, group=None, name=c.MAP_BOX):
- pg.sprite.Sprite.__init__(self)
-
- self.frames = []
- self.frame_index = 0
- self.load_frames()
- self.image = self.frames[self.frame_index]
- self.rect = self.image.get_rect()
- self.rect.x = x
- self.rect.y = y
-
- self.rest_height = y
- self.animation_timer = 0
- self.first_half = True # First half of animation cycle
- self.state = c.RESTING
- self.y_vel = 0
- self.gravity = 1.2
- self.type = type
- self.group = group
- self.name = name
-
- def load_frames(self):
- sheet = setup.GFX['tile_set']
- frame_rect_list = [(384, 0, 16, 16), (400, 0, 16, 16),
- (416, 0, 16, 16), (400, 0, 16, 16), (432, 0, 16, 16)]
- for frame_rect in frame_rect_list:
- self.frames.append(tools.get_image(sheet, *frame_rect,
- c.BLACK, c.BRICK_SIZE_MULTIPLIER))
-
- def update(self, game_info):
- self.current_time = game_info[c.CURRENT_TIME]
- if self.state == c.RESTING:
- self.resting()
- elif self.state == c.BUMPED:
- self.bumped()
-
- def resting(self):
- time_list = [375, 125, 125, 125]
- if (self.current_time - self.animation_timer) > time_list[self.frame_index]:
- self.frame_index += 1
- if self.frame_index == 4:
- self.frame_index = 0
- self.animation_timer = self.current_time
-
- self.image = self.frames[self.frame_index]
-
- def bumped(self):
- self.rect.y += self.y_vel
- self.y_vel += self.gravity
-
- if self.rect.y > self.rest_height + 5:
- self.rect.y = self.rest_height
- self.state = c.OPENED
- if self.type == c.TYPE_MUSHROOM:
- self.group.add(powerup.Mushroom(
- self.rect.centerx, self.rect.y))
- elif self.type == c.TYPE_FIREFLOWER:
- self.group.add(powerup.FireFlower(
- self.rect.centerx, self.rect.y))
- elif self.type == c.TYPE_LIFEMUSHROOM:
- self.group.add(powerup.LifeMushroom(
- self.rect.centerx, self.rect.y))
- self.frame_index = 4
- self.image = self.frames[self.frame_index]
-
- def start_bump(self, score_group):
- self.y_vel = -6
- self.state = c.BUMPED
-
- if self.type == c.TYPE_COIN:
- self.group.add(coin.Coin(self.rect.centerx,
- self.rect.y, score_group))
diff --git a/MARIO-BROS/source/components/brick.py b/MARIO-BROS/source/components/brick.py
deleted file mode 100644
index 4212c05..0000000
--- a/MARIO-BROS/source/components/brick.py
+++ /dev/null
@@ -1,138 +0,0 @@
-import pygame as pg
-from .. import setup, tools
-from .. import constants as c
-from . import coin, stuff, powerup
-
-
-def create_brick(brick_group, item, level):
- if c.COLOR in item:
- color = item[c.COLOR]
- else:
- color = c.COLOR_TYPE_ORANGE
-
- x, y, type = item['x'], item['y'], item['type']
- if type == c.TYPE_COIN:
- brick_group.add(Brick(x, y, type,
- color, level.coin_group))
- elif (type == c.TYPE_STAR or
- type == c.TYPE_FIREFLOWER or
- type == c.TYPE_LIFEMUSHROOM):
- brick_group.add(Brick(x, y, type,
- color, level.powerup_group))
- else:
- if c.BRICK_NUM in item:
- create_brick_list(brick_group, item[c.BRICK_NUM], x, y, type,
- color, item['direction'])
- else:
- brick_group.add(Brick(x, y, type, color))
-
-
-def create_brick_list(brick_group, num, x, y, type, color, direction):
- ''' direction:horizontal, create brick from left to right, direction:vertical, create brick from up to bottom '''
- size = 43 # 16 * c.BRICK_SIZE_MULTIPLIER is 43
- tmp_x, tmp_y = x, y
- for i in range(num):
- if direction == c.VERTICAL:
- tmp_y = y + i * size
- else:
- tmp_x = x + i * size
- brick_group.add(Brick(tmp_x, tmp_y, type, color))
-
-
-class Brick(stuff.Stuff):
- def __init__(self, x, y, type, color=c.ORANGE, group=None, name=c.MAP_BRICK):
- orange_rect = [(16, 0, 16, 16), (432, 0, 16, 16)]
- green_rect = [(208, 32, 16, 16), (48, 32, 16, 16)]
- if color == c.COLOR_TYPE_ORANGE:
- frame_rect = orange_rect
- else:
- frame_rect = green_rect
- stuff.Stuff.__init__(self, x, y, setup.GFX['tile_set'],
- frame_rect, c.BRICK_SIZE_MULTIPLIER)
-
- self.rest_height = y
- self.state = c.RESTING
- self.y_vel = 0
- self.gravity = 1.2
- self.type = type
- if self.type == c.TYPE_COIN:
- self.coin_num = 10
- else:
- self.coin_num = 0
- self.group = group
- self.name = name
-
- def update(self):
- if self.state == c.BUMPED:
- self.bumped()
-
- def bumped(self):
- self.rect.y += self.y_vel
- self.y_vel += self.gravity
-
- if self.rect.y >= self.rest_height:
- self.rect.y = self.rest_height
- if self.type == c.TYPE_COIN:
- if self.coin_num > 0:
- self.state = c.RESTING
- else:
- self.state = c.OPENED
- elif self.type == c.TYPE_STAR:
- self.state = c.OPENED
- self.group.add(powerup.Star(
- self.rect.centerx, self.rest_height))
- elif self.type == c.TYPE_FIREFLOWER:
- self.state = c.OPENED
- self.group.add(powerup.FireFlower(
- self.rect.centerx, self.rest_height))
- elif self.type == c.TYPE_LIFEMUSHROOM:
- self.state = c.OPENED
- self.group.add(powerup.LifeMushroom(
- self.rect.centerx, self.rest_height))
- else:
- self.state = c.RESTING
-
- def start_bump(self, score_group):
- self.y_vel -= 7
-
- if self.type == c.TYPE_COIN:
- if self.coin_num > 0:
- self.group.add(coin.Coin(self.rect.centerx,
- self.rect.y, score_group))
- self.coin_num -= 1
- if self.coin_num == 0:
- self.frame_index = 1
- self.image = self.frames[self.frame_index]
- elif (self.type == c.TYPE_STAR or
- self.type == c.TYPE_FIREFLOWER or
- self.type == c.TYPE_LIFEMUSHROOM):
- self.frame_index = 1
- self.image = self.frames[self.frame_index]
-
- self.state = c.BUMPED
-
- def change_to_piece(self, group):
- arg_list = [(self.rect.x, self.rect.y - (self.rect.height/2), -2, -12),
- (self.rect.right, self.rect.y - (self.rect.height/2), 2, -12),
- (self.rect.x, self.rect.y, -2, -6),
- (self.rect.right, self.rect.y, 2, -6)]
-
- for arg in arg_list:
- group.add(BrickPiece(*arg))
- self.kill()
-
-
-class BrickPiece(stuff.Stuff):
- def __init__(self, x, y, x_vel, y_vel):
- stuff.Stuff.__init__(self, x, y, setup.GFX['tile_set'],
- [(68, 20, 8, 8)], c.BRICK_SIZE_MULTIPLIER)
- self.x_vel = x_vel
- self.y_vel = y_vel
- self.gravity = .8
-
- def update(self, *args):
- self.rect.x += self.x_vel
- self.rect.y += self.y_vel
- self.y_vel += self.gravity
- if self.rect.y > c.SCREEN_HEIGHT:
- self.kill()
diff --git a/MARIO-BROS/source/components/coin.py b/MARIO-BROS/source/components/coin.py
deleted file mode 100644
index bc3acc6..0000000
--- a/MARIO-BROS/source/components/coin.py
+++ /dev/null
@@ -1,116 +0,0 @@
-import pygame as pg
-from .. import setup, tools
-from .. import constants as c
-
-
-class Coin(pg.sprite.Sprite):
- def __init__(self, x, y, score_group):
- pg.sprite.Sprite.__init__(self)
-
- self.frames = []
- self.frame_index = 0
- self.load_frames()
- self.image = self.frames[self.frame_index]
- self.rect = self.image.get_rect()
- self.rect.centerx = x
- self.rect.bottom = y - 5
- self.gravity = 1
- self.y_vel = -15
- self.animation_timer = 0
- self.initial_height = self.rect.bottom - 5
- self.score_group = score_group
-
- def load_frames(self):
- sheet = setup.GFX[c.ITEM_SHEET]
- frame_rect_list = [(52, 113, 8, 14), (4, 113, 8, 14),
- (20, 113, 8, 14), (36, 113, 8, 14)]
- for frame_rect in frame_rect_list:
- self.frames.append(tools.get_image(sheet, *frame_rect,
- c.BLACK, c.BRICK_SIZE_MULTIPLIER))
-
- def update(self, game_info):
- self.current_time = game_info[c.CURRENT_TIME]
- self.spinning()
-
- def spinning(self):
- self.image = self.frames[self.frame_index]
- self.rect.y += self.y_vel
- self.y_vel += self.gravity
-
- if (self.current_time - self.animation_timer) > 80:
- if self.frame_index < 3:
- self.frame_index += 1
- else:
- self.frame_index = 0
- self.animation_timer = self.current_time
-
- if self.rect.bottom > self.initial_height:
- self.kill()
-
-
-class FlashCoin(pg.sprite.Sprite):
- def __init__(self, x, y):
- pg.sprite.Sprite.__init__(self)
- self.frame_index = 0
- self.frames = []
- self.load_frames()
- self.image = self.frames[self.frame_index]
- self.rect = self.image.get_rect()
- self.rect.x = x
- self.rect.y = y
- self.animation_timer = 0
-
- def load_frames(self):
- sheet = setup.GFX[c.ITEM_SHEET]
- frame_rect_list = [(1, 160, 5, 8), (9, 160, 5, 8),
- (17, 160, 5, 8), (9, 160, 5, 8)]
- for frame_rect in frame_rect_list:
- self.frames.append(tools.get_image(sheet, *frame_rect,
- c.BLACK, c.BRICK_SIZE_MULTIPLIER))
-
- def update(self, current_time):
- time_list = [375, 125, 125, 125]
- if self.animation_timer == 0:
- self.animation_timer = current_time
- elif (current_time - self.animation_timer) > time_list[self.frame_index]:
- self.frame_index += 1
- if self.frame_index == 4:
- self.frame_index = 0
- self.animation_timer = current_time
-
- self.image = self.frames[self.frame_index]
-
-
-class StaticCoin(pg.sprite.Sprite):
- def __init__(self, x, y):
- pg.sprite.Sprite.__init__(self)
- self.frame_index = 0
- self.frames = []
- self.load_frames()
- self.image = self.frames[self.frame_index]
- self.rect = self.image.get_rect()
- self.rect.x = x
- self.rect.y = y
- self.animation_timer = 0
-
- def load_frames(self):
- sheet = setup.GFX[c.ITEM_SHEET]
- frame_rect_list = [(3, 98, 9, 13), (19, 98, 9, 13),
- (35, 98, 9, 13), (51, 98, 9, 13)]
- for frame_rect in frame_rect_list:
- self.frames.append(tools.get_image(sheet, *frame_rect,
- c.BLACK, c.BRICK_SIZE_MULTIPLIER))
-
- def update(self, game_info):
- self.current_time = game_info[c.CURRENT_TIME]
-
- time_list = [375, 125, 125, 125]
- if self.animation_timer == 0:
- self.animation_timer = self.current_time
- elif (self.current_time - self.animation_timer) > time_list[self.frame_index]:
- self.frame_index += 1
- if self.frame_index == 4:
- self.frame_index = 0
- self.animation_timer = self.current_time
-
- self.image = self.frames[self.frame_index]
diff --git a/MARIO-BROS/source/components/enemy.py b/MARIO-BROS/source/components/enemy.py
deleted file mode 100644
index e24bac7..0000000
--- a/MARIO-BROS/source/components/enemy.py
+++ /dev/null
@@ -1,516 +0,0 @@
-import math
-import pygame as pg
-from .. import setup, tools
-from .. import constants as c
-
-ENEMY_SPEED = 1
-
-
-def create_enemy(item, level):
- dir = c.LEFT if item['direction'] == 0 else c.RIGHT
- color = item[c.COLOR]
- if c.ENEMY_RANGE in item:
- in_range = item[c.ENEMY_RANGE]
- range_start = item['range_start']
- range_end = item['range_end']
- else:
- in_range = False
- range_start = range_end = 0
-
- if item['type'] == c.ENEMY_TYPE_GOOMBA:
- sprite = Goomba(item['x'], item['y'], dir, color,
- in_range, range_start, range_end)
- elif item['type'] == c.ENEMY_TYPE_KOOPA:
- sprite = Koopa(item['x'], item['y'], dir, color,
- in_range, range_start, range_end)
- elif item['type'] == c.ENEMY_TYPE_FLY_KOOPA:
- isVertical = False if item['is_vertical'] == 0 else True
- sprite = FlyKoopa(item['x'], item['y'], dir, color,
- in_range, range_start, range_end, isVertical)
- elif item['type'] == c.ENEMY_TYPE_PIRANHA:
- sprite = Piranha(item['x'], item['y'], dir, color,
- in_range, range_start, range_end)
- elif item['type'] == c.ENEMY_TYPE_FIRE_KOOPA:
- sprite = FireKoopa(item['x'], item['y'], dir, color,
- in_range, range_start, range_end, level)
- elif item['type'] == c.ENEMY_TYPE_FIRESTICK:
- '''use a number of fireballs to stimulate a firestick'''
- sprite = []
- num = item['num']
- center_x, center_y = item['x'], item['y']
- for i in range(num):
- radius = i * 21 # 8 * 2.69 = 21
- sprite.append(FireStick(center_x, center_y, dir, color,
- radius))
- return sprite
-
-
-class Enemy(pg.sprite.Sprite):
- def __init__(self):
- pg.sprite.Sprite.__init__(self)
-
- def setup_enemy(self, x, y, direction, name, sheet, frame_rect_list,
- in_range, range_start, range_end, isVertical=False):
- self.frames = []
- self.frame_index = 0
- self.animate_timer = 0
- self.gravity = 1.5
- self.state = c.WALK
-
- self.name = name
- self.direction = direction
- self.load_frames(sheet, frame_rect_list)
- self.image = self.frames[self.frame_index]
- self.rect = self.image.get_rect()
- self.rect.x = x
- self.rect.bottom = y
- self.in_range = in_range
- self.range_start = range_start
- self.range_end = range_end
- self.isVertical = isVertical
- self.set_velocity()
- self.death_timer = 0
-
- def load_frames(self, sheet, frame_rect_list):
- for frame_rect in frame_rect_list:
- self.frames.append(tools.get_image(sheet, *frame_rect,
- c.BLACK, c.SIZE_MULTIPLIER))
-
- def set_velocity(self):
- if self.isVertical:
- self.x_vel = 0
- self.y_vel = ENEMY_SPEED
- else:
- self.x_vel = ENEMY_SPEED * -1 if self.direction == c.LEFT else ENEMY_SPEED
- self.y_vel = 0
-
- def update(self, game_info, level):
- self.current_time = game_info[c.CURRENT_TIME]
- self.handle_state()
- self.animation()
- self.update_position(level)
-
- def handle_state(self):
- if (self.state == c.WALK or
- self.state == c.FLY):
- self.walking()
- elif self.state == c.FALL:
- self.falling()
- elif self.state == c.JUMPED_ON:
- self.jumped_on()
- elif self.state == c.DEATH_JUMP:
- self.death_jumping()
- elif self.state == c.SHELL_SLIDE:
- self.shell_sliding()
- elif self.state == c.REVEAL:
- self.revealing()
-
- def walking(self):
- if (self.current_time - self.animate_timer) > 125:
- if self.direction == c.RIGHT:
- if self.frame_index == 4:
- self.frame_index += 1
- elif self.frame_index == 5:
- self.frame_index = 4
- else:
- if self.frame_index == 0:
- self.frame_index += 1
- elif self.frame_index == 1:
- self.frame_index = 0
- self.animate_timer = self.current_time
-
- def falling(self):
- if self.y_vel < 10:
- self.y_vel += self.gravity
-
- def jumped_on(self):
- pass
-
- def death_jumping(self):
- self.rect.y += self.y_vel
- self.rect.x += self.x_vel
- self.y_vel += self.gravity
- if self.rect.y > c.SCREEN_HEIGHT:
- self.kill()
-
- def shell_sliding(self):
- if self.direction == c.RIGHT:
- self.x_vel = 10
- else:
- self.x_vel = -10
-
- def revealing(self):
- pass
-
- def start_death_jump(self, direction):
- self.y_vel = -8
- self.x_vel = 2 if direction == c.RIGHT else -2
- self.gravity = .5
- self.frame_index = 3
- self.state = c.DEATH_JUMP
-
- def animation(self):
- self.image = self.frames[self.frame_index]
-
- def update_position(self, level):
- self.rect.x += self.x_vel
- self.check_x_collisions(level)
-
- if self.in_range and self.isVertical:
- if self.rect.y < self.range_start:
- self.rect.y = self.range_start
- self.y_vel = ENEMY_SPEED
- elif self.rect.bottom > self.range_end:
- self.rect.bottom = self.range_end
- self.y_vel = -1 * ENEMY_SPEED
-
- self.rect.y += self.y_vel
- if (self.state != c.DEATH_JUMP and
- self.state != c.FLY):
- self.check_y_collisions(level)
-
- if self.rect.x <= 0:
- self.kill()
- elif self.rect.y > (level.viewport.bottom):
- self.kill()
-
- def check_x_collisions(self, level):
- if self.in_range and not self.isVertical:
- if self.rect.x < self.range_start:
- self.rect.x = self.range_start
- self.change_direction(c.RIGHT)
- elif self.rect.right > self.range_end:
- self.rect.right = self.range_end
- self.change_direction(c.LEFT)
- else:
- collider = pg.sprite.spritecollideany(
- self, level.ground_step_pipe_group)
- if collider:
- if self.direction == c.RIGHT:
- self.rect.right = collider.rect.left
- self.change_direction(c.LEFT)
- elif self.direction == c.LEFT:
- self.rect.left = collider.rect.right
- self.change_direction(c.RIGHT)
-
- if self.state == c.SHELL_SLIDE:
- enemy = pg.sprite.spritecollideany(self, level.enemy_group)
- if enemy:
- level.update_score(100, enemy, 0)
- level.move_to_dying_group(level.enemy_group, enemy)
- enemy.start_death_jump(self.direction)
-
- def change_direction(self, direction):
- self.direction = direction
- if self.direction == c.RIGHT:
- self.x_vel = ENEMY_SPEED
- if self.state == c.WALK or self.state == c.FLY:
- self.frame_index = 4
- else:
- self.x_vel = ENEMY_SPEED * -1
- if self.state == c.WALK or self.state == c.FLY:
- self.frame_index = 0
-
- def check_y_collisions(self, level):
- # decrease runtime delay: when enemey is on the ground, don't check brick and box
- if self.rect.bottom >= c.GROUND_HEIGHT:
- sprite_group = level.ground_step_pipe_group
- else:
- sprite_group = pg.sprite.Group(level.ground_step_pipe_group,
- level.brick_group, level.box_group)
- sprite = pg.sprite.spritecollideany(self, sprite_group)
- if sprite and sprite.name != c.MAP_SLIDER:
- if self.rect.top <= sprite.rect.top:
- self.rect.bottom = sprite.rect.y
- self.y_vel = 0
- self.state = c.WALK
- level.check_is_falling(self)
-
-
-class Goomba(Enemy):
- def __init__(self, x, y, direction, color, in_range,
- range_start, range_end, name=c.GOOMBA):
- Enemy.__init__(self)
- frame_rect_list = self.get_frame_rect(color)
- self.setup_enemy(x, y, direction, name, setup.GFX[c.ENEMY_SHEET],
- frame_rect_list, in_range, range_start, range_end)
- # dead jump image
- self.frames.append(pg.transform.flip(self.frames[2], False, True))
- # right walk images
- self.frames.append(pg.transform.flip(self.frames[0], True, False))
- self.frames.append(pg.transform.flip(self.frames[1], True, False))
-
- def get_frame_rect(self, color):
- if color == c.COLOR_TYPE_GREEN:
- frame_rect_list = [(0, 34, 16, 16), (30, 34, 16, 16),
- (61, 30, 16, 16)]
- else:
- frame_rect_list = [(0, 4, 16, 16), (30, 4, 16, 16),
- (61, 0, 16, 16)]
- return frame_rect_list
-
- def jumped_on(self):
- self.x_vel = 0
- self.frame_index = 2
- if self.death_timer == 0:
- self.death_timer = self.current_time
- elif (self.current_time - self.death_timer) > 500:
- self.kill()
-
-
-class Koopa(Enemy):
- def __init__(self, x, y, direction, color, in_range,
- range_start, range_end, name=c.KOOPA):
- Enemy.__init__(self)
- frame_rect_list = self.get_frame_rect(color)
- self.setup_enemy(x, y, direction, name, setup.GFX[c.ENEMY_SHEET],
- frame_rect_list, in_range, range_start, range_end)
- # dead jump image
- self.frames.append(pg.transform.flip(self.frames[2], False, True))
- # right walk images
- self.frames.append(pg.transform.flip(self.frames[0], True, False))
- self.frames.append(pg.transform.flip(self.frames[1], True, False))
-
- def get_frame_rect(self, color):
- if color == c.COLOR_TYPE_GREEN:
- frame_rect_list = [(150, 0, 16, 24), (180, 0, 16, 24),
- (360, 5, 16, 15)]
- elif color == c.COLOR_TYPE_RED:
- frame_rect_list = [(150, 30, 16, 24), (180, 30, 16, 24),
- (360, 35, 16, 15)]
- else:
- frame_rect_list = [(150, 60, 16, 24), (180, 60, 16, 24),
- (360, 65, 16, 15)]
- return frame_rect_list
-
- def jumped_on(self):
- self.x_vel = 0
- self.frame_index = 2
- x = self.rect.x
- bottom = self.rect.bottom
- self.rect = self.frames[self.frame_index].get_rect()
- self.rect.x = x
- self.rect.bottom = bottom
- self.in_range = False
-
-
-class FlyKoopa(Enemy):
- def __init__(self, x, y, direction, color, in_range,
- range_start, range_end, isVertical, name=c.FLY_KOOPA):
- Enemy.__init__(self)
- frame_rect_list = self.get_frame_rect(color)
- self.setup_enemy(x, y, direction, name, setup.GFX[c.ENEMY_SHEET],
- frame_rect_list, in_range, range_start, range_end, isVertical)
- # dead jump image
- self.frames.append(pg.transform.flip(self.frames[2], False, True))
- # right walk images
- self.frames.append(pg.transform.flip(self.frames[0], True, False))
- self.frames.append(pg.transform.flip(self.frames[1], True, False))
- self.state = c.FLY
-
- def get_frame_rect(self, color):
- if color == c.COLOR_TYPE_GREEN:
- frame_rect_list = [(90, 0, 16, 24), (120, 0, 16, 24),
- (330, 5, 16, 15)]
- else:
- frame_rect_list = [(90, 30, 16, 24), (120, 30, 16, 24),
- (330, 35, 16, 15)]
- return frame_rect_list
-
- def jumped_on(self):
- self.x_vel = 0
- self.frame_index = 2
- x = self.rect.x
- bottom = self.rect.bottom
- self.rect = self.frames[self.frame_index].get_rect()
- self.rect.x = x
- self.rect.bottom = bottom
- self.in_range = False
- self.isVertical = False
-
-
-class FireKoopa(Enemy):
- def __init__(self, x, y, direction, color, in_range,
- range_start, range_end, level, name=c.FIRE_KOOPA):
- Enemy.__init__(self)
- frame_rect_list = [(2, 210, 32, 32), (42, 210, 32, 32),
- (82, 210, 32, 32), (122, 210, 32, 32)]
- self.setup_enemy(x, y, direction, name, setup.GFX[c.ENEMY_SHEET],
- frame_rect_list, in_range, range_start, range_end)
- # right walk images
- self.frames.append(pg.transform.flip(self.frames[0], True, False))
- self.frames.append(pg.transform.flip(self.frames[1], True, False))
- self.frames.append(pg.transform.flip(self.frames[2], True, False))
- self.frames.append(pg.transform.flip(self.frames[3], True, False))
- self.x_vel = 0
- self.gravity = 0.3
- self.level = level
- self.fire_timer = 0
- self.jump_timer = 0
-
- def load_frames(self, sheet, frame_rect_list):
- for frame_rect in frame_rect_list:
- self.frames.append(tools.get_image(sheet, *frame_rect,
- c.BLACK, c.BRICK_SIZE_MULTIPLIER))
-
- def walking(self):
- if (self.current_time - self.animate_timer) > 250:
- if self.direction == c.RIGHT:
- self.frame_index += 1
- if self.frame_index > 7:
- self.frame_index = 4
- else:
- self.frame_index += 1
- if self.frame_index > 3:
- self.frame_index = 0
- self.animate_timer = self.current_time
-
- self.shoot_fire()
- if self.should_jump():
- self.y_vel = -7
-
- def falling(self):
- if self.y_vel < 7:
- self.y_vel += self.gravity
- self.shoot_fire()
-
- def should_jump(self):
- if (self.rect.x - self.level.player.rect.x) < 400:
- if (self.current_time - self.jump_timer) > 2500:
- self.jump_timer = self.current_time
- return True
- return False
-
- def shoot_fire(self):
- if (self.current_time - self.fire_timer) > 3000:
- self.fire_timer = self.current_time
- self.level.enemy_group.add(
- Fire(self.rect.x, self.rect.bottom-20, self.direction))
-
-
-class Fire(Enemy):
- def __init__(self, x, y, direction, name=c.FIRE):
- Enemy.__init__(self)
- frame_rect_list = [(101, 253, 23, 8), (131, 253, 23, 8)]
- in_range, range_start, range_end = False, 0, 0
- self.setup_enemy(x, y, direction, name, setup.GFX[c.ENEMY_SHEET],
- frame_rect_list, in_range, range_start, range_end)
- # right images
- self.frames.append(pg.transform.flip(self.frames[0], True, False))
- self.frames.append(pg.transform.flip(self.frames[1], True, False))
- self.state = c.FLY
- self.x_vel = 5 if self.direction == c.RIGHT else -5
-
- def check_x_collisions(self, level):
- sprite_group = pg.sprite.Group(level.ground_step_pipe_group,
- level.brick_group, level.box_group)
- sprite = pg.sprite.spritecollideany(self, sprite_group)
- if sprite:
- self.kill()
-
- def start_death_jump(self, direction):
- self.kill()
-
-
-class Piranha(Enemy):
- def __init__(self, x, y, direction, color, in_range,
- range_start, range_end, name=c.PIRANHA):
- Enemy.__init__(self)
- frame_rect_list = self.get_frame_rect(color)
- self.setup_enemy(x, y, direction, name, setup.GFX[c.ENEMY_SHEET],
- frame_rect_list, in_range, range_start, range_end)
- self.state = c.REVEAL
- self.y_vel = 1
- self.wait_timer = 0
- self.group = pg.sprite.Group()
- self.group.add(self)
-
- def get_frame_rect(self, color):
- if color == c.COLOR_TYPE_GREEN:
- frame_rect_list = [(390, 30, 16, 24), (420, 30, 16, 24)]
- else:
- frame_rect_list = [(390, 60, 16, 24), (420, 60, 16, 24)]
- return frame_rect_list
-
- def revealing(self):
- if (self.current_time - self.animate_timer) > 250:
- if self.frame_index == 0:
- self.frame_index += 1
- elif self.frame_index == 1:
- self.frame_index = 0
- self.animate_timer = self.current_time
-
- def update_position(self, level):
- if self.check_player_is_on(level):
- pass
- else:
- if self.rect.y < self.range_start:
- self.rect.y = self.range_start
- self.y_vel = 1
- elif self.rect.bottom > self.range_end:
- if self.wait_timer == 0:
- self.wait_timer = self.current_time
- elif (self.current_time - self.wait_timer) < 3000:
- return
- else:
- self.wait_timer = 0
- self.rect.bottom = self.range_end
- self.y_vel = -1
- self.rect.y += self.y_vel
-
- def check_player_is_on(self, level):
- result = False
- self.rect.y -= 5
- sprite = pg.sprite.spritecollideany(level.player, self.group)
- if sprite:
- result = True
- self.rect.y += 5
- return result
-
- def start_death_jump(self, direction):
- self.kill()
-
-
-class FireStick(pg.sprite.Sprite):
- def __init__(self, center_x, center_y, direction, color, radius, name=c.FIRESTICK):
- '''the firestick will rotate around the center of a circle'''
- pg.sprite.Sprite.__init__(self)
-
- self.frames = []
- self.frame_index = 0
- self.animate_timer = 0
- self.name = name
- rect_list = [(96, 144, 8, 8), (104, 144, 8, 8),
- (96, 152, 8, 8), (104, 152, 8, 8)]
- self.load_frames(setup.GFX[c.ITEM_SHEET], rect_list)
- self.animate_timer = 0
- self.image = self.frames[self.frame_index]
- self.rect = self.image.get_rect()
- self.rect.x = center_x - radius
- self.rect.y = center_y
- self.center_x = center_x
- self.center_y = center_y
- self.radius = radius
- self.angle = 0
-
- def load_frames(self, sheet, frame_rect_list):
- for frame_rect in frame_rect_list:
- self.frames.append(tools.get_image(sheet, *frame_rect,
- c.BLACK, c.BRICK_SIZE_MULTIPLIER))
-
- def update(self, game_info, level):
- self.current_time = game_info[c.CURRENT_TIME]
- if (self.current_time - self.animate_timer) > 100:
- if self.frame_index < 3:
- self.frame_index += 1
- else:
- self.frame_index = 0
- self.animate_timer = self.current_time
- self.image = self.frames[self.frame_index]
-
- self.angle += 1
- if self.angle == 360:
- self.angle = 0
- radian = math.radians(self.angle)
- self.rect.x = self.center_x + math.sin(radian) * self.radius
- self.rect.y = self.center_y + math.cos(radian) * self.radius
diff --git a/MARIO-BROS/source/components/info.py b/MARIO-BROS/source/components/info.py
deleted file mode 100644
index c1a3dd0..0000000
--- a/MARIO-BROS/source/components/info.py
+++ /dev/null
@@ -1,197 +0,0 @@
-import pygame as pg
-from .. import setup, tools
-from .. import constants as c
-from . import coin
-
-
-class Character(pg.sprite.Sprite):
- def __init__(self, image):
- pg.sprite.Sprite.__init__(self)
- self.image = image
- self.rect = self.image.get_rect()
-
-
-class Info():
- def __init__(self, game_info, state):
- self.coin_total = game_info[c.COIN_TOTAL]
- self.total_lives = game_info[c.LIVES]
- self.state = state
- self.game_info = game_info
-
- self.create_font_image_dict()
- self.create_info_labels()
- self.create_state_labels()
- self.flashing_coin = coin.FlashCoin(280, 53)
-
- def create_font_image_dict(self):
- self.image_dict = {}
- image_list = []
-
- image_rect_list = [ # 0 - 9
- (3, 230, 7, 7), (12, 230, 7, 7), (19, 230, 7, 7),
- (27, 230, 7, 7), (35, 230, 7, 7), (43, 230, 7, 7),
- (51, 230, 7, 7), (59, 230, 7, 7), (67, 230, 7, 7),
- (75, 230, 7, 7),
- # A - Z
- (83, 230, 7, 7), (91, 230, 7, 7), (99, 230, 7, 7),
- (107, 230, 7, 7), (115, 230, 7, 7), (123, 230, 7, 7),
- (3, 238, 7, 7), (11, 238, 7, 7), (20, 238, 7, 7),
- (27, 238, 7, 7), (35, 238, 7, 7), (44, 238, 7, 7),
- (51, 238, 7, 7), (59, 238, 7, 7), (67, 238, 7, 7),
- (75, 238, 7, 7), (83, 238, 7, 7), (91, 238, 7, 7),
- (99, 238, 7, 7), (108, 238, 7, 7), (115, 238, 7, 7),
- (123, 238, 7, 7), (3, 246, 7, 7), (11, 246, 7, 7),
- (20, 246, 7, 7), (27, 246, 7, 7), (48, 246, 7, 7),
- # -*
- (68, 249, 6, 2), (75, 247, 6, 6)]
-
- character_string = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ -*'
-
- for character, image_rect in zip(character_string, image_rect_list):
- self.image_dict[character] = tools.get_image(setup.GFX['text_images'],
- *image_rect, (92, 148, 252), 2.9)
-
- def create_info_labels(self):
- self.score_text = []
- self.coin_count_text = []
- self.mario_label = []
- self.world_label = []
- self.time_label = []
- self.stage_label = []
-
- self.create_label(self.score_text, '000000', 75, 55)
- self.create_label(self.coin_count_text, '*00', 300, 55)
- self.create_label(self.mario_label, 'MARIO', 75, 30)
- self.create_label(self.world_label, 'WORLD', 450, 30)
- self.create_label(self.time_label, 'TIME', 625, 30)
- self.create_label(self.stage_label, '1-1', 472, 55)
-
- self.info_labels = [self.score_text, self.coin_count_text, self.mario_label,
- self.world_label, self.time_label, self.stage_label]
-
- def create_state_labels(self):
- if self.state == c.MAIN_MENU:
- self.create_main_menu_labels()
- elif self.state == c.LOAD_SCREEN:
- self.create_player_image()
- self.create_load_screen_labels()
- elif self.state == c.LEVEL:
- self.create_level_labels()
- elif self.state == c.GAME_OVER:
- self.create_game_over_labels()
- elif self.state == c.TIME_OUT:
- self.create_time_out_labels()
-
- def create_player_image(self):
- self.life_times_image = tools.get_image(setup.GFX['text_images'],
- 75, 247, 6, 6, (92, 148, 252), 2.9)
- self.life_times_rect = self.life_times_image.get_rect(
- center=(378, 295))
- self.life_total_label = []
- self.create_label(self.life_total_label,
- str(self.total_lives), 450, 285)
-
- if self.game_info[c.PLAYER_NAME] == c.PLAYER_MARIO:
- rect = (178, 32, 12, 16)
- else:
- rect = (178, 128, 12, 16)
- self.player_image = tools.get_image(setup.GFX['mario_bros'],
- *rect, (92, 148, 252), 2.9)
- self.player_rect = self.player_image.get_rect(center=(320, 290))
-
- def create_main_menu_labels(self):
- mario_game = []
- luigi_game = []
- top = []
- top_score = []
-
- self.create_label(mario_game, c.PLAYER1, 272, 360)
- self.create_label(luigi_game, c.PLAYER2, 272, 405)
- self.create_label(top, 'TOP - ', 290, 465)
- self.create_label(top_score, '000000', 400, 465)
- self.state_labels = [mario_game, luigi_game, top, top_score,
- *self.info_labels]
-
- def create_load_screen_labels(self):
- world_label = []
- self.stage_label2 = []
-
- self.create_label(world_label, 'WORLD', 280, 200)
- self.create_label(self.stage_label2, '1-1', 430, 200)
- self.state_labels = [world_label, self.stage_label2,
- *self.info_labels, self.life_total_label]
-
- def create_level_labels(self):
- self.time = c.GAME_TIME_OUT
- self.current_time = 0
-
- self.clock_time_label = []
- self.create_label(self.clock_time_label, str(self.time), 645, 55)
- self.state_labels = [*self.info_labels, self.clock_time_label]
-
- def create_game_over_labels(self):
- game_label = []
- over_label = []
-
- self.create_label(game_label, 'GAME', 280, 300)
- self.create_label(over_label, 'OVER', 400, 300)
-
- self.state_labels = [game_label, over_label, *self.info_labels]
-
- def create_time_out_labels(self):
- timeout_label = []
- self.create_label(timeout_label, 'TIME OUT', 290, 310)
- self.state_labels = [timeout_label, *self.info_labels]
-
- def create_label(self, label_list, string, x, y):
- for letter in string:
- label_list.append(Character(self.image_dict[letter]))
- self.set_label_rects(label_list, x, y)
-
- def set_label_rects(self, label_list, x, y):
- for i, letter in enumerate(label_list):
- letter.rect.x = x + ((letter.rect.width + 3) * i)
- letter.rect.y = y
- if letter.image == self.image_dict['-']:
- letter.rect.y += 7
- letter.rect.x += 2
-
- def update(self, level_info, level=None):
- self.level = level
- self.handle_level_state(level_info)
-
- def handle_level_state(self, level_info):
- self.score = level_info[c.SCORE]
- self.update_text(self.score_text, self.score)
- self.update_text(self.coin_count_text, level_info[c.COIN_TOTAL])
- self.update_text(self.stage_label, level_info[c.LEVEL_NUM])
- self.flashing_coin.update(level_info[c.CURRENT_TIME])
- if self.state == c.LOAD_SCREEN:
- self.update_text(self.stage_label2, level_info[c.LEVEL_NUM])
- if self.state == c.LEVEL:
- if (level_info[c.CURRENT_TIME] - self.current_time) > 1000:
- self.current_time = level_info[c.CURRENT_TIME]
- self.time -= 1
- self.update_text(self.clock_time_label, self.time, True)
-
- def update_text(self, text, score, reset=False):
- if reset and len(text) > len(str(score)):
- text.remove(text[0])
- index = len(text) - 1
- for digit in reversed(str(score)):
- rect = text[index].rect
- text[index] = Character(self.image_dict[digit])
- text[index].rect = rect
- index -= 1
-
- def draw(self, surface):
- self.draw_info(surface, self.state_labels)
- if self.state == c.LOAD_SCREEN:
- surface.blit(self.player_image, self.player_rect)
- surface.blit(self.life_times_image, self.life_times_rect)
- surface.blit(self.flashing_coin.image, self.flashing_coin.rect)
-
- def draw_info(self, surface, label_list):
- for label in label_list:
- for letter in label:
- surface.blit(letter.image, letter.rect)
diff --git a/MARIO-BROS/source/components/player.py b/MARIO-BROS/source/components/player.py
deleted file mode 100644
index 4933203..0000000
--- a/MARIO-BROS/source/components/player.py
+++ /dev/null
@@ -1,546 +0,0 @@
-import os
-import json
-import pygame as pg
-from .. import setup, tools
-from .. import constants as c
-from ..components import powerup
-
-
-class Player(pg.sprite.Sprite):
- def __init__(self, player_name):
- pg.sprite.Sprite.__init__(self)
- self.player_name = player_name
- self.load_data()
- self.setup_timer()
- self.setup_state()
- self.setup_speed()
- self.load_images()
-
- if c.DEBUG:
- self.right_frames = self.big_fire_frames[0]
- self.left_frames = self.big_fire_frames[1]
- self.big = True
- self.fire = True
-
- self.frame_index = 0
- self.state = c.WALK
- self.image = self.right_frames[self.frame_index]
- self.rect = self.image.get_rect()
-
- def restart(self):
- '''restart after player is dead or go to next level'''
- if self.dead:
- self.dead = False
- self.big = False
- self.fire = False
- self.set_player_image(self.small_normal_frames, 0)
- self.right_frames = self.small_normal_frames[0]
- self.left_frames = self.small_normal_frames[1]
- self.state = c.STAND
-
- def load_data(self):
- player_file = str(self.player_name) + '.json'
- file_path = os.path.join('source', 'data', 'player', player_file)
- f = open(file_path)
- self.player_data = json.load(f)
-
- def setup_timer(self):
- self.walking_timer = 0
- self.death_timer = 0
- self.flagpole_timer = 0
- self.transition_timer = 0
- self.hurt_invincible_timer = 0
- self.invincible_timer = 0
- self.last_fireball_time = 0
-
- def setup_state(self):
- self.facing_right = True
- self.allow_jump = True
- self.allow_fireball = True
- self.dead = False
- self.big = False
- self.fire = False
- self.hurt_invincible = False
- self.invincible = False
- self.crouching = False
-
- def setup_speed(self):
- speed = self.player_data[c.PLAYER_SPEED]
- self.x_vel = 0
- self.y_vel = 0
-
- self.max_walk_vel = speed[c.MAX_WALK_SPEED]
- self.max_run_vel = speed[c.MAX_RUN_SPEED]
- self.max_y_vel = speed[c.MAX_Y_VEL]
- self.walk_accel = speed[c.WALK_ACCEL]
- self.run_accel = speed[c.RUN_ACCEL]
- self.jump_vel = speed[c.JUMP_VEL]
-
- self.gravity = c.GRAVITY
- self.max_x_vel = self.max_walk_vel
- self.x_accel = self.walk_accel
-
- def load_images(self):
- sheet = setup.GFX['mario_bros']
- frames_list = self.player_data[c.PLAYER_FRAMES]
-
- self.right_frames = []
- self.left_frames = []
-
- self.right_small_normal_frames = []
- self.left_small_normal_frames = []
- self.right_big_normal_frames = []
- self.left_big_normal_frames = []
- self.right_big_fire_frames = []
- self.left_big_fire_frames = []
-
- for name, frames in frames_list.items():
- for frame in frames:
- image = tools.get_image(sheet, frame['x'], frame['y'],
- frame['width'], frame['height'],
- c.BLACK, c.SIZE_MULTIPLIER)
- left_image = pg.transform.flip(image, True, False)
-
- if name == c.RIGHT_SMALL_NORMAL:
- self.right_small_normal_frames.append(image)
- self.left_small_normal_frames.append(left_image)
- elif name == c.RIGHT_BIG_NORMAL:
- self.right_big_normal_frames.append(image)
- self.left_big_normal_frames.append(left_image)
- elif name == c.RIGHT_BIG_FIRE:
- self.right_big_fire_frames.append(image)
- self.left_big_fire_frames.append(left_image)
-
- self.small_normal_frames = [self.right_small_normal_frames,
- self.left_small_normal_frames]
- self.big_normal_frames = [self.right_big_normal_frames,
- self.left_big_normal_frames]
- self.big_fire_frames = [self.right_big_fire_frames,
- self.left_big_fire_frames]
-
- self.all_images = [self.right_small_normal_frames,
- self.left_small_normal_frames,
- self.right_big_normal_frames,
- self.left_big_normal_frames,
- self.right_big_fire_frames,
- self.left_big_fire_frames]
-
- self.right_frames = self.small_normal_frames[0]
- self.left_frames = self.small_normal_frames[1]
-
- def update(self, keys, game_info, fire_group):
- self.current_time = game_info[c.CURRENT_TIME]
- self.handle_state(keys, fire_group)
- self.check_if_hurt_invincible()
- self.check_if_invincible()
- self.animation()
-
- def handle_state(self, keys, fire_group):
- if self.state == c.STAND:
- self.standing(keys, fire_group)
- elif self.state == c.WALK:
- self.walking(keys, fire_group)
- elif self.state == c.JUMP:
- self.jumping(keys, fire_group)
- elif self.state == c.FALL:
- self.falling(keys, fire_group)
- elif self.state == c.DEATH_JUMP:
- self.jumping_to_death()
- elif self.state == c.FLAGPOLE:
- self.flag_pole_sliding()
- elif self.state == c.WALK_AUTO:
- self.walking_auto()
- elif self.state == c.END_OF_LEVEL_FALL:
- self.y_vel += self.gravity
- elif self.state == c.IN_CASTLE:
- self.frame_index = 0
- elif self.state == c.SMALL_TO_BIG:
- self.changing_to_big()
- elif self.state == c.BIG_TO_SMALL:
- self.changing_to_small()
- elif self.state == c.BIG_TO_FIRE:
- self.changing_to_fire()
- elif self.state == c.DOWN_TO_PIPE:
- self.y_vel = 1
- self.rect.y += self.y_vel
- elif self.state == c.UP_OUT_PIPE:
- self.y_vel = -1
- self.rect.y += self.y_vel
- if self.rect.bottom < self.up_pipe_y:
- self.state = c.STAND
-
- def check_to_allow_jump(self, keys):
- if not keys[tools.keybinding['jump']]:
- self.allow_jump = True
-
- def check_to_allow_fireball(self, keys):
- if not keys[tools.keybinding['action']]:
- self.allow_fireball = True
-
- def standing(self, keys, fire_group):
- self.check_to_allow_jump(keys)
- self.check_to_allow_fireball(keys)
-
- self.frame_index = 0
- self.x_vel = 0
- self.y_vel = 0
-
- if keys[tools.keybinding['action']]:
- if self.fire and self.allow_fireball:
- self.shoot_fireball(fire_group)
-
- if keys[tools.keybinding['down']]:
- self.update_crouch_or_not(True)
-
- if keys[tools.keybinding['left']]:
- self.facing_right = False
- self.update_crouch_or_not()
- self.state = c.WALK
- elif keys[tools.keybinding['right']]:
- self.facing_right = True
- self.update_crouch_or_not()
- self.state = c.WALK
- elif keys[tools.keybinding['jump']]:
- if self.allow_jump:
- self.state = c.JUMP
- self.y_vel = self.jump_vel
-
- if not keys[tools.keybinding['down']]:
- self.update_crouch_or_not()
-
- def update_crouch_or_not(self, isDown=False):
- if not self.big:
- self.crouching = True if isDown else False
- return
- if not isDown and not self.crouching:
- return
-
- self.crouching = True if isDown else False
- frame_index = 7 if isDown else 0
- bottom = self.rect.bottom
- left = self.rect.x
- if self.facing_right:
- self.image = self.right_frames[frame_index]
- else:
- self.image = self.left_frames[frame_index]
- self.rect = self.image.get_rect()
- self.rect.bottom = bottom
- self.rect.x = left
- self.frame_index = frame_index
-
- def walking(self, keys, fire_group):
- self.check_to_allow_jump(keys)
- self.check_to_allow_fireball(keys)
-
- if self.frame_index == 0:
- self.frame_index += 1
- self.walking_timer = self.current_time
- elif (self.current_time - self.walking_timer >
- self.calculate_animation_speed()):
- if self.frame_index < 3:
- self.frame_index += 1
- else:
- self.frame_index = 1
- self.walking_timer = self.current_time
-
- if keys[tools.keybinding['action']]:
- self.max_x_vel = self.max_run_vel
- self.x_accel = self.run_accel
- if self.fire and self.allow_fireball:
- self.shoot_fireball(fire_group)
- else:
- self.max_x_vel = self.max_walk_vel
- self.x_accel = self.walk_accel
-
- if keys[tools.keybinding['jump']]:
- if self.allow_jump:
- self.state = c.JUMP
- if abs(self.x_vel) > 4:
- self.y_vel = self.jump_vel - .5
- else:
- self.y_vel = self.jump_vel
-
- if keys[tools.keybinding['left']]:
- self.facing_right = False
- if self.x_vel > 0:
- self.frame_index = 5
- self.x_accel = c.SMALL_TURNAROUND
-
- self.x_vel = self.cal_vel(
- self.x_vel, self.max_x_vel, self.x_accel, True)
- elif keys[tools.keybinding['right']]:
- self.facing_right = True
- if self.x_vel < 0:
- self.frame_index = 5
- self.x_accel = c.SMALL_TURNAROUND
-
- self.x_vel = self.cal_vel(self.x_vel, self.max_x_vel, self.x_accel)
- else:
- if self.facing_right:
- if self.x_vel > 0:
- self.x_vel -= self.x_accel
- else:
- self.x_vel = 0
- self.state = c.STAND
- else:
- if self.x_vel < 0:
- self.x_vel += self.x_accel
- else:
- self.x_vel = 0
- self.state = c.STAND
-
- def jumping(self, keys, fire_group):
- """ y_vel value: positive is down, negative is up """
- self.check_to_allow_fireball(keys)
-
- self.allow_jump = False
- self.frame_index = 4
- self.gravity = c.JUMP_GRAVITY
- self.y_vel += self.gravity
-
- if self.y_vel >= 0 and self.y_vel < self.max_y_vel:
- self.gravity = c.GRAVITY
- self.state = c.FALL
-
- if keys[tools.keybinding['right']]:
- self.x_vel = self.cal_vel(self.x_vel, self.max_x_vel, self.x_accel)
- elif keys[tools.keybinding['left']]:
- self.x_vel = self.cal_vel(
- self.x_vel, self.max_x_vel, self.x_accel, True)
-
- if not keys[tools.keybinding['jump']]:
- self.gravity = c.GRAVITY
- self.state = c.FALL
-
- if keys[tools.keybinding['action']]:
- if self.fire and self.allow_fireball:
- self.shoot_fireball(fire_group)
-
- def falling(self, keys, fire_group):
- self.check_to_allow_fireball(keys)
- self.y_vel = self.cal_vel(self.y_vel, self.max_y_vel, self.gravity)
-
- if keys[tools.keybinding['right']]:
- self.x_vel = self.cal_vel(self.x_vel, self.max_x_vel, self.x_accel)
- elif keys[tools.keybinding['left']]:
- self.x_vel = self.cal_vel(
- self.x_vel, self.max_x_vel, self.x_accel, True)
-
- if keys[tools.keybinding['action']]:
- if self.fire and self.allow_fireball:
- self.shoot_fireball(fire_group)
-
- def jumping_to_death(self):
- if self.death_timer == 0:
- self.death_timer = self.current_time
- elif (self.current_time - self.death_timer) > 500:
- self.rect.y += self.y_vel
- self.y_vel += self.gravity
-
- def cal_vel(self, vel, max_vel, accel, isNegative=False):
- """ max_vel and accel must > 0 """
- if isNegative:
- new_vel = vel * -1
- else:
- new_vel = vel
- if (new_vel + accel) < max_vel:
- new_vel += accel
- else:
- new_vel = max_vel
- if isNegative:
- return new_vel * -1
- else:
- return new_vel
-
- def calculate_animation_speed(self):
- if self.x_vel == 0:
- animation_speed = 130
- elif self.x_vel > 0:
- animation_speed = 130 - (self.x_vel * 13)
- else:
- animation_speed = 130 - (self.x_vel * 13 * -1)
- return animation_speed
-
- def shoot_fireball(self, powerup_group):
- if (self.current_time - self.last_fireball_time) > 500:
- self.allow_fireball = False
- powerup_group.add(powerup.FireBall(self.rect.right,
- self.rect.y, self.facing_right))
- self.last_fireball_time = self.current_time
- self.frame_index = 6
-
- def flag_pole_sliding(self):
- self.state = c.FLAGPOLE
- self.x_vel = 0
- self.y_vel = 5
-
- if self.flagpole_timer == 0:
- self.flagpole_timer = self.current_time
- elif self.rect.bottom < 493:
- if (self.current_time - self.flagpole_timer) < 65:
- self.frame_index = 9
- elif (self.current_time - self.flagpole_timer) < 130:
- self.frame_index = 10
- else:
- self.flagpole_timer = self.current_time
- elif self.rect.bottom >= 493:
- self.frame_index = 10
-
- def walking_auto(self):
- self.max_x_vel = 5
- self.x_accel = self.walk_accel
-
- self.x_vel = self.cal_vel(self.x_vel, self.max_x_vel, self.x_accel)
-
- if (self.walking_timer == 0 or (self.current_time - self.walking_timer) > 200):
- self.walking_timer = self.current_time
- elif (self.current_time - self.walking_timer >
- self.calculate_animation_speed()):
- if self.frame_index < 3:
- self.frame_index += 1
- else:
- self.frame_index = 1
- self.walking_timer = self.current_time
-
- def changing_to_big(self):
- timer_list = [135, 200, 365, 430, 495, 560, 625, 690, 755, 820, 885]
- # size value 0:small, 1:middle, 2:big
- size_list = [1, 0, 1, 0, 1, 2, 0, 1, 2, 0, 2]
- frames = [(self.small_normal_frames, 0), (self.small_normal_frames, 7),
- (self.big_normal_frames, 0)]
- if self.transition_timer == 0:
- self.big = True
- self.change_index = 0
- self.transition_timer = self.current_time
- elif (self.current_time - self.transition_timer) > timer_list[self.change_index]:
- if (self.change_index + 1) >= len(timer_list):
- # player becomes big
- self.transition_timer = 0
- self.set_player_image(self.big_normal_frames, 0)
- self.state = c.WALK
- self.right_frames = self.right_big_normal_frames
- self.left_frames = self.left_big_normal_frames
- else:
- frame, frame_index = frames[size_list[self.change_index]]
- self.set_player_image(frame, frame_index)
- self.change_index += 1
-
- def changing_to_small(self):
- timer_list = [265, 330, 395, 460, 525, 590, 655, 720, 785, 850, 915]
- # size value 0:big, 1:middle, 2:small
- size_list = [0, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]
- frames = [(self.big_normal_frames, 4), (self.big_normal_frames, 8),
- (self.small_normal_frames, 8)]
-
- if self.transition_timer == 0:
- self.change_index = 0
- self.transition_timer = self.current_time
- elif (self.current_time - self.transition_timer) > timer_list[self.change_index]:
- if (self.change_index + 1) >= len(timer_list):
- # player becomes small
- self.transition_timer = 0
- self.set_player_image(self.small_normal_frames, 0)
- self.state = c.WALK
- self.big = False
- self.fire = False
- self.hurt_invincible = True
- self.right_frames = self.right_small_normal_frames
- self.left_frames = self.left_small_normal_frames
- else:
- frame, frame_index = frames[size_list[self.change_index]]
- self.set_player_image(frame, frame_index)
- self.change_index += 1
-
- def changing_to_fire(self):
- timer_list = [65, 195, 260, 325, 390, 455,
- 520, 585, 650, 715, 780, 845, 910, 975]
- # size value 0:fire, 1:big green, 2:big red, 3:big black
- size_list = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1]
- frames = [(self.big_fire_frames, 3), (self.big_normal_frames, 3),
- (self.big_fire_frames, 3), (self.big_normal_frames, 3)]
-
- if self.transition_timer == 0:
- self.change_index = 0
- self.transition_timer = self.current_time
- elif (self.current_time - self.transition_timer) > timer_list[self.change_index]:
- if (self.change_index + 1) >= len(timer_list):
- # player becomes fire
- self.transition_timer = 0
- self.set_player_image(self.big_fire_frames, 3)
- self.fire = True
- self.state = c.WALK
- self.right_frames = self.right_big_fire_frames
- self.left_frames = self.left_big_fire_frames
- else:
- frame, frame_index = frames[size_list[self.change_index]]
- self.set_player_image(frame, frame_index)
- self.change_index += 1
-
- def set_player_image(self, frames, frame_index):
- self.frame_index = frame_index
- if self.facing_right:
- self.right_frames = frames[0]
- self.image = frames[0][frame_index]
- else:
- self.left_frames = frames[1]
- self.image = frames[1][frame_index]
- bottom = self.rect.bottom
- centerx = self.rect.centerx
- self.rect = self.image.get_rect()
- self.rect.bottom = bottom
- self.rect.centerx = centerx
-
- def check_if_hurt_invincible(self):
- if self.hurt_invincible:
- if self.hurt_invincible_timer == 0:
- self.hurt_invincible_timer = self.current_time
- self.hurt_invincible_timer2 = self.current_time
- elif (self.current_time - self.hurt_invincible_timer) < 2000:
- if (self.current_time - self.hurt_invincible_timer2) < 35:
- self.image.set_alpha(0)
- elif (self.current_time - self.hurt_invincible_timer2) < 70:
- self.image.set_alpha(255)
- self.hurt_invincible_timer2 = self.current_time
- else:
- self.hurt_invincible = False
- self.hurt_invincible_timer = 0
- for frames in self.all_images:
- for image in frames:
- image.set_alpha(255)
-
- def check_if_invincible(self):
- if self.invincible:
- if self.invincible_timer == 0:
- self.invincible_timer = self.current_time
- self.invincible_timer2 = self.current_time
- elif (self.current_time - self.invincible_timer) < 10000:
- if (self.current_time - self.invincible_timer2) < 35:
- self.image.set_alpha(0)
- elif (self.current_time - self.invincible_timer2) < 70:
- self.image.set_alpha(255)
- self.invincible_timer2 = self.current_time
- elif (self.current_time - self.invincible_timer) < 12000:
- if (self.current_time - self.invincible_timer2) < 100:
- self.image.set_alpha(0)
- elif (self.current_time - self.invincible_timer2) < 200:
- self.image.set_alpha(255)
- self.invincible_timer2 = self.current_time
- else:
- self.invincible = False
- self.invincible_timer = 0
- for frames in self.all_images:
- for image in frames:
- image.set_alpha(255)
-
- def animation(self):
- if self.facing_right:
- self.image = self.right_frames[self.frame_index]
- else:
- self.image = self.left_frames[self.frame_index]
-
- def start_death_jump(self, game_info):
- self.dead = True
- self.y_vel = -11
- self.gravity = .5
- self.frame_index = 6
- self.state = c.DEATH_JUMP
diff --git a/MARIO-BROS/source/components/powerup.py b/MARIO-BROS/source/components/powerup.py
deleted file mode 100644
index 0f27ee6..0000000
--- a/MARIO-BROS/source/components/powerup.py
+++ /dev/null
@@ -1,245 +0,0 @@
-import pygame as pg
-from .. import setup, tools
-from .. import constants as c
-from . import stuff
-
-
-class Powerup(stuff.Stuff):
- def __init__(self, x, y, sheet, image_rect_list, scale):
- stuff.Stuff.__init__(self, x, y, sheet, image_rect_list, scale)
- self.rect.centerx = x
- self.state = c.REVEAL
- self.y_vel = -1
- self.x_vel = 0
- self.direction = c.RIGHT
- self.box_height = y
- self.gravity = 1
- self.max_y_vel = 8
- self.animate_timer = 0
-
- def update_position(self, level):
- self.rect.x += self.x_vel
- self.check_x_collisions(level)
-
- self.rect.y += self.y_vel
- self.check_y_collisions(level)
-
- if self.rect.x <= 0:
- self.kill()
- elif self.rect.y > (level.viewport.bottom):
- self.kill()
-
- def check_x_collisions(self, level):
- sprite_group = pg.sprite.Group(level.ground_step_pipe_group,
- level.brick_group, level.box_group)
- sprite = pg.sprite.spritecollideany(self, sprite_group)
- if sprite:
- if self.direction == c.RIGHT:
- self.rect.right = sprite.rect.left-1
- self.direction = c.LEFT
- elif self.direction == c.LEFT:
- self.rect.left = sprite.rect.right
- self.direction = c.RIGHT
- self.x_vel = self.speed if self.direction == c.RIGHT else -1 * self.speed
- if sprite.name == c.MAP_BRICK:
- self.x_vel = 0
-
- def check_y_collisions(self, level):
- sprite_group = pg.sprite.Group(level.ground_step_pipe_group,
- level.brick_group, level.box_group)
-
- sprite = pg.sprite.spritecollideany(self, sprite_group)
- if sprite:
- self.y_vel = 0
- self.rect.bottom = sprite.rect.top
- self.state = c.SLIDE
- level.check_is_falling(self)
-
- def animation(self):
- self.image = self.frames[self.frame_index]
-
-
-class Mushroom(Powerup):
- def __init__(self, x, y):
- Powerup.__init__(self, x, y, setup.GFX[c.ITEM_SHEET],
- [(0, 0, 16, 16)], c.SIZE_MULTIPLIER)
- self.type = c.TYPE_MUSHROOM
- self.speed = 2
-
- def update(self, game_info, level):
- if self.state == c.REVEAL:
- self.rect.y += self.y_vel
- if self.rect.bottom <= self.box_height:
- self.rect.bottom = self.box_height
- self.y_vel = 0
- self.state = c.SLIDE
- elif self.state == c.SLIDE:
- self.x_vel = self.speed if self.direction == c.RIGHT else -1 * self.speed
- elif self.state == c.FALL:
- if self.y_vel < self.max_y_vel:
- self.y_vel += self.gravity
-
- if self.state == c.SLIDE or self.state == c.FALL:
- self.update_position(level)
- self.animation()
-
-
-class LifeMushroom(Mushroom):
- def __init__(self, x, y):
- Powerup.__init__(self, x, y, setup.GFX[c.ITEM_SHEET],
- [(16, 0, 16, 16)], c.SIZE_MULTIPLIER)
- self.type = c.TYPE_LIFEMUSHROOM
- self.speed = 2
-
-
-class FireFlower(Powerup):
- def __init__(self, x, y):
- frame_rect_list = [(0, 32, 16, 16), (16, 32, 16, 16),
- (32, 32, 16, 16), (48, 32, 16, 16)]
- Powerup.__init__(self, x, y, setup.GFX[c.ITEM_SHEET],
- frame_rect_list, c.SIZE_MULTIPLIER)
- self.type = c.TYPE_FIREFLOWER
-
- def update(self, game_info, *args):
- self.current_time = game_info[c.CURRENT_TIME]
- if self.state == c.REVEAL:
- self.rect.y += self.y_vel
- if self.rect.bottom <= self.box_height:
- self.rect.bottom = self.box_height
- self.y_vel = 0
- self.state = c.RESTING
-
- if (self.current_time - self.animate_timer) > 30:
- if self.frame_index < 3:
- self.frame_index += 1
- else:
- self.frame_index = 0
- self.animate_timer = self.current_time
-
- self.animation()
-
-
-class Star(Powerup):
- def __init__(self, x, y):
- frame_rect_list = [(1, 48, 15, 16), (17, 48, 15, 16),
- (33, 48, 15, 16), (49, 48, 15, 16)]
- Powerup.__init__(self, x, y, setup.GFX[c.ITEM_SHEET],
- frame_rect_list, c.SIZE_MULTIPLIER)
- self.type = c.TYPE_STAR
- self.gravity = .4
- self.speed = 5
-
- def update(self, game_info, level):
- self.current_time = game_info[c.CURRENT_TIME]
- if self.state == c.REVEAL:
- self.rect.y += self.y_vel
- if self.rect.bottom <= self.box_height:
- self.rect.bottom = self.box_height
- self.y_vel = -2
- self.state = c.BOUNCING
- elif self.state == c.BOUNCING:
- self.y_vel += self.gravity
- self.x_vel = self.speed if self.direction == c.RIGHT else -1 * self.speed
-
- if (self.current_time - self.animate_timer) > 30:
- if self.frame_index < 3:
- self.frame_index += 1
- else:
- self.frame_index = 0
- self.animate_timer = self.current_time
-
- if self.state == c.BOUNCING:
- self.update_position(level)
- self.animation()
-
- def check_y_collisions(self, level):
- sprite_group = pg.sprite.Group(level.ground_step_pipe_group,
- level.brick_group, level.box_group)
-
- sprite = pg.sprite.spritecollideany(self, sprite_group)
-
- if sprite:
- if self.rect.top > sprite.rect.top:
- self.y_vel = 5
- else:
- self.rect.bottom = sprite.rect.y
- self.y_vel = -5
-
-
-class FireBall(Powerup):
- def __init__(self, x, y, facing_right):
- # first 3 Frames are flying, last 4 frams are exploding
- frame_rect_list = [(96, 144, 8, 8), (104, 144, 8, 8),
- (96, 152, 8, 8), (104, 152, 8, 8),
- (112, 144, 16, 16), (112, 160, 16, 16),
- (112, 176, 16, 16)]
- Powerup.__init__(self, x, y, setup.GFX[c.ITEM_SHEET],
- frame_rect_list, c.SIZE_MULTIPLIER)
- self.type = c.TYPE_FIREBALL
- self.y_vel = 10
- self.gravity = .9
- self.state = c.FLYING
- self.rect.right = x
- if facing_right:
- self.direction = c.RIGHT
- self.x_vel = 12
- else:
- self.direction = c.LEFT
- self.x_vel = -12
-
- def update(self, game_info, level):
- self.current_time = game_info[c.CURRENT_TIME]
-
- if self.state == c.FLYING or self.state == c.BOUNCING:
- self.y_vel += self.gravity
- if (self.current_time - self.animate_timer) > 200:
- if self.frame_index < 3:
- self.frame_index += 1
- else:
- self.frame_index = 0
- self.animate_timer = self.current_time
- self.update_position(level)
- elif self.state == c.EXPLODING:
- if (self.current_time - self.animate_timer) > 50:
- if self.frame_index < 6:
- self.frame_index += 1
- else:
- self.kill()
- self.animate_timer = self.current_time
-
- self.animation()
-
- def check_x_collisions(self, level):
- sprite_group = pg.sprite.Group(level.ground_step_pipe_group,
- level.brick_group, level.box_group)
- sprite = pg.sprite.spritecollideany(self, sprite_group)
- if sprite:
- self.change_to_explode()
-
- def check_y_collisions(self, level):
- sprite_group = pg.sprite.Group(level.ground_step_pipe_group,
- level.brick_group, level.box_group)
-
- sprite = pg.sprite.spritecollideany(self, sprite_group)
- enemy = pg.sprite.spritecollideany(self, level.enemy_group)
- if sprite:
- if self.rect.top > sprite.rect.top:
- self.change_to_explode()
- else:
- self.rect.bottom = sprite.rect.y
- self.y_vel = -8
- if self.direction == c.RIGHT:
- self.x_vel = 15
- else:
- self.x_vel = -15
- self.state = c.BOUNCING
- elif enemy:
- if (enemy.name != c.FIRESTICK):
- level.update_score(100, enemy, 0)
- level.move_to_dying_group(level.enemy_group, enemy)
- enemy.start_death_jump(self.direction)
- self.change_to_explode()
-
- def change_to_explode(self):
- self.frame_index = 4
- self.state = c.EXPLODING
diff --git a/MARIO-BROS/source/components/stuff.py b/MARIO-BROS/source/components/stuff.py
deleted file mode 100644
index c0cc308..0000000
--- a/MARIO-BROS/source/components/stuff.py
+++ /dev/null
@@ -1,232 +0,0 @@
-import pygame as pg
-from .. import setup, tools
-from .. import constants as c
-
-
-class Collider(pg.sprite.Sprite):
- def __init__(self, x, y, width, height, name):
- pg.sprite.Sprite.__init__(self)
- self.image = pg.Surface((width, height)).convert()
- self.rect = self.image.get_rect()
- self.rect.x = x
- self.rect.y = y
- self.name = name
- if c.DEBUG:
- self.image.fill(c.RED)
-
-
-class Checkpoint(pg.sprite.Sprite):
- def __init__(self, x, y, width, height, type, enemy_groupid=0, map_index=0, name=c.MAP_CHECKPOINT):
- pg.sprite.Sprite.__init__(self)
- self.image = pg.Surface((width, height))
- self.rect = self.image.get_rect()
- self.rect.x = x
- self.rect.y = y
- self.type = type
- self.enemy_groupid = enemy_groupid
- self.map_index = map_index
- self.name = name
-
-
-class Stuff(pg.sprite.Sprite):
- def __init__(self, x, y, sheet, image_rect_list, scale):
- pg.sprite.Sprite.__init__(self)
-
- self.frames = []
- self.frame_index = 0
- for image_rect in image_rect_list:
- self.frames.append(tools.get_image(sheet,
- *image_rect, c.BLACK, scale))
- self.image = self.frames[self.frame_index]
- self.rect = self.image.get_rect()
- self.rect.x = x
- self.rect.y = y
-
- def update(self, *args):
- pass
-
-
-class Pole(Stuff):
- def __init__(self, x, y):
- Stuff.__init__(self, x, y, setup.GFX['tile_set'],
- [(263, 144, 2, 16)], c.BRICK_SIZE_MULTIPLIER)
-
-
-class PoleTop(Stuff):
- def __init__(self, x, y):
- Stuff.__init__(self, x, y, setup.GFX['tile_set'],
- [(228, 120, 8, 8)], c.BRICK_SIZE_MULTIPLIER)
-
-
-class Flag(Stuff):
- def __init__(self, x, y):
- Stuff.__init__(self, x, y, setup.GFX[c.ITEM_SHEET],
- [(128, 32, 16, 16)], c.SIZE_MULTIPLIER)
- self.state = c.TOP_OF_POLE
- self.y_vel = 5
-
- def update(self):
- if self.state == c.SLIDE_DOWN:
- self.rect.y += self.y_vel
- if self.rect.bottom >= 485:
- self.state = c.BOTTOM_OF_POLE
-
-
-class CastleFlag(Stuff):
- def __init__(self, x, y):
- Stuff.__init__(self, x, y, setup.GFX[c.ITEM_SHEET],
- [(129, 2, 14, 14)], c.SIZE_MULTIPLIER)
- self.y_vel = -2
- self.target_height = y
-
- def update(self):
- if self.rect.bottom > self.target_height:
- self.rect.y += self.y_vel
-
-
-class Digit(pg.sprite.Sprite):
- def __init__(self, image):
- pg.sprite.Sprite.__init__(self)
- self.image = image
- self.rect = self.image.get_rect()
-
-
-class Score():
- def __init__(self, x, y, score):
- self.x = x
- self.y = y
- self.y_vel = -3
- self.create_images_dict()
- self.score = score
- self.create_score_digit()
- self.distance = 130 if self.score == 1000 else 75
-
- def create_images_dict(self):
- self.image_dict = {}
- digit_rect_list = [(1, 168, 3, 8), (5, 168, 3, 8),
- (8, 168, 4, 8), (0, 0, 0, 0),
- (12, 168, 4, 8), (16, 168, 5, 8),
- (0, 0, 0, 0), (0, 0, 0, 0),
- (20, 168, 4, 8), (0, 0, 0, 0)]
- digit_string = '0123456789'
- for digit, image_rect in zip(digit_string, digit_rect_list):
- self.image_dict[digit] = tools.get_image(setup.GFX[c.ITEM_SHEET],
- *image_rect, c.BLACK, c.BRICK_SIZE_MULTIPLIER)
-
- def create_score_digit(self):
- self.digit_group = pg.sprite.Group()
- self.digit_list = []
- for digit in str(self.score):
- self.digit_list.append(Digit(self.image_dict[digit]))
-
- for i, digit in enumerate(self.digit_list):
- digit.rect = digit.image.get_rect()
- digit.rect.x = self.x + (i * 10)
- digit.rect.y = self.y
-
- def update(self, score_list):
- for digit in self.digit_list:
- digit.rect.y += self.y_vel
-
- if (self.y - self.digit_list[0].rect.y) > self.distance:
- score_list.remove(self)
-
- def draw(self, screen):
- for digit in self.digit_list:
- screen.blit(digit.image, digit.rect)
-
-
-class Pipe(Stuff):
- def __init__(self, x, y, width, height, type, name=c.MAP_PIPE):
- if type == c.PIPE_TYPE_HORIZONTAL:
- rect = [(32, 128, 37, 30)]
- else:
- rect = [(0, 160, 32, 30)]
- Stuff.__init__(self, x, y, setup.GFX['tile_set'],
- rect, c.BRICK_SIZE_MULTIPLIER)
- self.name = name
- self.type = type
- if type != c.PIPE_TYPE_HORIZONTAL:
- self.create_image(x, y, height)
-
- def create_image(self, x, y, pipe_height):
- img = self.image
- rect = self.image.get_rect()
- width = rect.w
- height = rect.h
- self.image = pg.Surface((width, pipe_height)).convert()
- self.rect = self.image.get_rect()
- self.rect.x = x
- self.rect.y = y
-
- top_height = height//2 + 3
- bottom_height = height//2 - 3
- self.image.blit(img, (0, 0), (0, 0, width, top_height))
- num = (pipe_height - top_height) // bottom_height + 1
- for i in range(num):
- y = top_height + i * bottom_height
- self.image.blit(img, (0, y), (0, top_height, width, bottom_height))
- self.image.set_colorkey(c.BLACK)
-
- def check_ignore_collision(self, level):
- if self.type == c.PIPE_TYPE_HORIZONTAL:
- return True
- elif level.player.state == c.DOWN_TO_PIPE:
- return True
- return False
-
-
-class Slider(Stuff):
- def __init__(self, x, y, num, direction, range_start, range_end, vel, name=c.MAP_SLIDER):
- Stuff.__init__(self, x, y, setup.GFX[c.ITEM_SHEET],
- [(64, 128, 15, 8)], 2.8)
- self.name = name
- self.create_image(x, y, num)
- self.range_start = range_start
- self.range_end = range_end
- self.direction = direction
- if self.direction == c.VERTICAL:
- self.y_vel = vel
- else:
- self.x_vel = vel
-
- def create_image(self, x, y, num):
- '''original slider image is short, we need to multiple it '''
- if num == 1:
- return
- img = self.image
- rect = self.image.get_rect()
- width = rect.w
- height = rect.h
- self.image = pg.Surface((width * num, height)).convert()
- self.rect = self.image.get_rect()
- self.rect.x = x
- self.rect.y = y
- for i in range(num):
- x = i * width
- self.image.blit(img, (x, 0))
- self.image.set_colorkey(c.BLACK)
-
- def update(self):
- if self.direction == c.VERTICAL:
- self.rect.y += self.y_vel
- if self.rect.y < -self.rect.h:
- self.rect.y = c.SCREEN_HEIGHT
- self.y_vel = -1
- elif self.rect.y > c.SCREEN_HEIGHT:
- self.rect.y = -self.rect.h
- self.y_vel = 1
- elif self.rect.y < self.range_start:
- self.rect.y = self.range_start
- self.y_vel = 1
- elif self.rect.bottom > self.range_end:
- self.rect.bottom = self.range_end
- self.y_vel = -1
- else:
- self.rect.x += self.x_vel
- if self.rect.x < self.range_start:
- self.rect.x = self.range_start
- self.x_vel = 1
- elif self.rect.left > self.range_end:
- self.rect.left = self.range_end
- self.x_vel = -1
diff --git a/MARIO-BROS/source/constants.py b/MARIO-BROS/source/constants.py
deleted file mode 100644
index bb365c5..0000000
--- a/MARIO-BROS/source/constants.py
+++ /dev/null
@@ -1,190 +0,0 @@
-DEBUG = False
-DEBUG_START_X = 110
-DEBUG_START_y = 538
-
-SCREEN_HEIGHT = 600
-SCREEN_WIDTH = 800
-SCREEN_SIZE = (SCREEN_WIDTH,SCREEN_HEIGHT)
-
-ORIGINAL_CAPTION = "Super Mario Bros"
-
-## COLORS ##
-# R G B
-GRAY = (100, 100, 100)
-NAVYBLUE = ( 60, 60, 100)
-WHITE = (255, 255, 255)
-RED = (255, 0, 0)
-GREEN = ( 0, 255, 0)
-FOREST_GREEN = ( 31, 162, 35)
-BLUE = ( 0, 0, 255)
-SKY_BLUE = ( 39, 145, 251)
-YELLOW = (255, 255, 0)
-ORANGE = (255, 128, 0)
-PURPLE = (255, 0, 255)
-CYAN = ( 0, 255, 255)
-BLACK = ( 0, 0, 0)
-NEAR_BLACK = ( 19, 15, 48)
-COMBLUE = (233, 232, 255)
-GOLD = (255, 215, 0)
-
-BGCOLOR = WHITE
-
-
-SIZE_MULTIPLIER = 2.5
-BRICK_SIZE_MULTIPLIER = 2.69
-BACKGROUND_MULTIPLER = 2.679
-GROUND_HEIGHT = SCREEN_HEIGHT - 62
-
-GAME_TIME_OUT = 301
-
-#STATES FOR ENTIRE GAME
-MAIN_MENU = 'main menu'
-LOAD_SCREEN = 'load screen'
-TIME_OUT = 'time out'
-GAME_OVER = 'game over'
-LEVEL = 'level'
-
-#MAIN MENU CURSOR STATES
-PLAYER1 = '1 PLAYER GAME'
-PLAYER2 = '2 PLAYER GAME'
-
-#GAME INFO DICTIONARY KEYS
-COIN_TOTAL = 'coin total'
-SCORE = 'score'
-TOP_SCORE = 'top score'
-LIVES = 'lives'
-CURRENT_TIME = 'current time'
-LEVEL_NUM = 'level num'
-PLAYER_NAME = 'player name'
-PLAYER_MARIO = 'mario'
-PLAYER_LUIGI = 'luigi'
-
-#MAP COMPONENTS
-MAP_IMAGE = 'image_name'
-MAP_MAPS = 'maps'
-SUB_MAP = 'sub_map'
-MAP_GROUND = 'ground'
-MAP_PIPE = 'pipe'
-PIPE_TYPE_NONE = 0
-PIPE_TYPE_IN = 1 # can go down in the pipe
-PIPE_TYPE_HORIZONTAL = 2 # can go right in the pipe
-MAP_STEP = 'step'
-MAP_BRICK = 'brick'
-BRICK_NUM = 'brick_num'
-TYPE_NONE = 0
-TYPE_COIN = 1
-TYPE_STAR = 2
-MAP_BOX = 'box'
-TYPE_MUSHROOM = 3
-TYPE_FIREFLOWER = 4
-TYPE_FIREBALL = 5
-TYPE_LIFEMUSHROOM = 6
-MAP_ENEMY = 'enemy'
-ENEMY_TYPE_GOOMBA = 0
-ENEMY_TYPE_KOOPA = 1
-ENEMY_TYPE_FLY_KOOPA = 2
-ENEMY_TYPE_PIRANHA = 3
-ENEMY_TYPE_FIRESTICK = 4
-ENEMY_TYPE_FIRE_KOOPA = 5
-ENEMY_RANGE = 'range'
-MAP_CHECKPOINT = 'checkpoint'
-ENEMY_GROUPID = 'enemy_groupid'
-MAP_INDEX = 'map_index'
-CHECKPOINT_TYPE_ENEMY = 0
-CHECKPOINT_TYPE_FLAG = 1
-CHECKPOINT_TYPE_CASTLE = 2
-CHECKPOINT_TYPE_MUSHROOM = 3
-CHECKPOINT_TYPE_PIPE = 4 # trigger player to go right in a pipe
-CHECKPOINT_TYPE_PIPE_UP = 5 # trigger player to another map and go up out of a pipe
-CHECKPOINT_TYPE_MAP = 6 # trigger player to go to another map
-CHECKPOINT_TYPE_BOSS = 7 # defeat the boss
-MAP_FLAGPOLE = 'flagpole'
-FLAGPOLE_TYPE_FLAG = 0
-FLAGPOLE_TYPE_POLE = 1
-FLAGPOLE_TYPE_TOP = 2
-MAP_SLIDER = 'slider'
-HORIZONTAL = 0
-VERTICAL = 1
-VELOCITY = 'velocity'
-MAP_COIN = 'coin'
-
-#COMPONENT COLOR
-COLOR = 'color'
-COLOR_TYPE_ORANGE = 0
-COLOR_TYPE_GREEN = 1
-COLOR_TYPE_RED = 2
-
-#BRICK STATES
-RESTING = 'resting'
-BUMPED = 'bumped'
-OPENED = 'opened'
-
-#MUSHROOM STATES
-REVEAL = 'reveal'
-SLIDE = 'slide'
-
-#Player FRAMES
-PLAYER_FRAMES = 'image_frames'
-RIGHT_SMALL_NORMAL = 'right_small_normal'
-RIGHT_BIG_NORMAL = 'right_big_normal'
-RIGHT_BIG_FIRE = 'right_big_fire'
-
-#PLAYER States
-STAND = 'standing'
-WALK = 'walk'
-JUMP = 'jump'
-FALL = 'fall'
-FLY = 'fly'
-SMALL_TO_BIG = 'small to big'
-BIG_TO_FIRE = 'big to fire'
-BIG_TO_SMALL = 'big to small'
-FLAGPOLE = 'flag pole'
-WALK_AUTO = 'walk auto' # not handle key input in this state
-END_OF_LEVEL_FALL = 'end of level fall'
-IN_CASTLE = 'in castle'
-DOWN_TO_PIPE = 'down to pipe'
-UP_OUT_PIPE = 'up out of pipe'
-
-#PLAYER FORCES
-PLAYER_SPEED = 'speed'
-WALK_ACCEL = 'walk_accel'
-RUN_ACCEL = 'run_accel'
-JUMP_VEL = 'jump_velocity'
-MAX_Y_VEL = 'max_y_velocity'
-MAX_RUN_SPEED = 'max_run_speed'
-MAX_WALK_SPEED = 'max_walk_speed'
-SMALL_TURNAROUND = .35
-JUMP_GRAVITY = .31
-GRAVITY = 1.01
-
-#LIST of ENEMIES
-GOOMBA = 'goomba'
-KOOPA = 'koopa'
-FLY_KOOPA = 'fly koopa'
-FIRE_KOOPA = 'fire koopa'
-FIRE = 'fire'
-PIRANHA = 'piranha'
-FIRESTICK = 'firestick'
-
-#GOOMBA Stuff
-LEFT = 'left'
-RIGHT = 'right'
-JUMPED_ON = 'jumped on'
-DEATH_JUMP = 'death jump'
-
-#KOOPA STUFF
-SHELL_SLIDE = 'shell slide'
-
-#FLAG STATE
-TOP_OF_POLE = 'top of pole'
-SLIDE_DOWN = 'slide down'
-BOTTOM_OF_POLE = 'bottom of pole'
-
-#FIREBALL STATE
-FLYING = 'flying'
-BOUNCING = 'bouncing'
-EXPLODING = 'exploding'
-
-#IMAGE SHEET
-ENEMY_SHEET = 'smb_enemies_sheet'
-ITEM_SHEET = 'item_objects'
\ No newline at end of file
diff --git a/MARIO-BROS/source/data/maps/level_1.json b/MARIO-BROS/source/data/maps/level_1.json
deleted file mode 100644
index f7b2ff8..0000000
--- a/MARIO-BROS/source/data/maps/level_1.json
+++ /dev/null
@@ -1,207 +0,0 @@
-{
- "image_name":"level_1",
- "maps":[
- {"start_x": 0, "end_x": 9086, "player_x": 110, "player_y":538},
- {"start_x":9090, "end_x": 9890, "player_x": 80, "player_y": 60},
- {"start_x":6740, "end_x": 9086, "player_x": 270, "player_y":450}
- ],
- "ground":[
- {"x": 0, "y":538, "width":2953, "height":60},
- {"x":3048, "y":538, "width": 635, "height":60},
- {"x":3819, "y":538, "width":2735, "height":60},
- {"x":6647, "y":538, "width":3250, "height":60}
- ],
- "pipe":[
- {"x":1201, "y":451, "width": 83, "height": 84, "type":0},
- {"x":1629, "y":409, "width": 83, "height":126, "type":0},
- {"x":1972, "y":366, "width": 83, "height":170, "type":0},
- {"x":2444, "y":366, "width": 83, "height":170, "type":1},
- {"x":6987, "y":451, "width": 83, "height": 84, "type":0},
- {"x":7673, "y":451, "width": 83, "height": 84, "type":0},
- {"x":9724, "y":451, "width": 40, "height": 84, "type":2}
- ],
- "step":[
- {"x":5745, "y":495, "width": 40, "height": 44},
- {"x":5788, "y":452, "width": 40, "height": 44},
- {"x":5831, "y":409, "width": 40, "height": 44},
- {"x":5874, "y":366, "width": 40, "height":176},
-
- {"x":6001, "y":366, "width": 40, "height":176},
- {"x":6044, "y":408, "width": 40, "height": 44},
- {"x":6087, "y":452, "width": 40, "height": 44},
- {"x":6130, "y":495, "width": 40, "height": 44},
-
- {"x":6345, "y":495, "width": 40, "height": 44},
- {"x":6388, "y":452, "width": 40, "height": 44},
- {"x":6431, "y":409, "width": 40, "height": 44},
- {"x":6474, "y":366, "width": 40, "height": 44},
- {"x":6517, "y":366, "width": 40, "height":176},
-
- {"x":6644, "y":366, "width": 40, "height":176},
- {"x":6687, "y":408, "width": 40, "height": 44},
- {"x":6728, "y":452, "width": 40, "height": 44},
- {"x":6771, "y":495, "width": 40, "height": 44},
-
- {"x":7760, "y":495, "width": 40, "height": 44},
- {"x":7803, "y":452, "width": 40, "height": 44},
- {"x":7845, "y":409, "width": 40, "height": 44},
- {"x":7888, "y":366, "width": 40, "height": 44},
- {"x":7931, "y":323, "width": 40, "height": 44},
- {"x":7974, "y":280, "width": 40, "height": 44},
- {"x":8017, "y":237, "width": 40, "height": 44},
- {"x":8060, "y":194, "width": 40, "height": 44},
- {"x":8103, "y":194, "width": 40, "height":360},
-
- {"x":8488, "y":495, "width": 40, "height": 44},
- {"x":9821, "y": 64, "width": 70, "height":530}
- ],
- "coin":[
- {"x":9318, "y":369},
- {"x":9362, "y":369},
- {"x":9406, "y":369},
- {"x":9450, "y":369},
- {"x":9494, "y":369},
- {"x":9538, "y":369},
- {"x":9582, "y":369},
- {"x":9318, "y":284},
- {"x":9362, "y":284},
- {"x":9406, "y":284},
- {"x":9450, "y":284},
- {"x":9494, "y":284},
- {"x":9538, "y":284},
- {"x":9582, "y":284},
- {"x":9362, "y":198},
- {"x":9406, "y":198},
- {"x":9450, "y":198},
- {"x":9494, "y":198},
- {"x":9538, "y":198}
- ],
- "brick":[
- {"x": 858, "y":365, "type":0},
- {"x": 944, "y":365, "type":0},
- {"x":1030, "y":365, "type":0},
- {"x":3299, "y":365, "type":0},
- {"x":3385, "y":365, "type":0},
-
- {"x":3430, "y":193, "type":0},
- {"x":3473, "y":193, "type":0},
- {"x":3473, "y":193, "type":0},
- {"x":3516, "y":193, "type":0},
- {"x":3559, "y":193, "type":0},
- {"x":3602, "y":193, "type":0},
- {"x":3645, "y":193, "type":0},
- {"x":3688, "y":193, "type":0},
- {"x":3731, "y":193, "type":0},
- {"x":3901, "y":193, "type":0},
- {"x":3944, "y":193, "type":0},
- {"x":3987, "y":193, "type":0},
-
- {"x":4030, "y":365, "type":1},
- {"x":4287, "y":365, "type":0},
- {"x":4330, "y":365, "type":2},
- {"x":5058, "y":365, "type":0},
-
- {"x":5187, "y":193, "type":0},
- {"x":5230, "y":193, "type":0},
- {"x":5273, "y":193, "type":0},
- {"x":5488, "y":193, "type":0},
- {"x":5574, "y":193, "type":0},
- {"x":5617, "y":193, "type":0},
- {"x":5531, "y":365, "type":0},
- {"x":5574, "y":365, "type":0},
- {"x":7202, "y":365, "type":0},
- {"x":7245, "y":365, "type":0},
- {"x":7331, "y":365, "type":0},
-
- {"x":9090, "y": 64, "type":0, "color":1,"brick_num":11, "direction":1},
- {"x":9310, "y": 64, "type":0, "color":1,"brick_num":7, "direction":0},
- {"x":9310, "y":406, "type":0, "color":1,"brick_num":7, "direction":0},
- {"x":9310, "y":449, "type":0, "color":1,"brick_num":7, "direction":0},
- {"x":9310, "y":492, "type":0, "color":1,"brick_num":7, "direction":0}
- ],
- "box":[
- {"x": 685, "y":365, "type":1},
- {"x": 901, "y":365, "type":3},
- {"x": 987, "y":365, "type":1},
- {"x": 943, "y":193, "type":1},
- {"x":3342, "y":365, "type":4},
- {"x":4030, "y":193, "type":1},
- {"x":4544, "y":365, "type":1},
- {"x":4672, "y":365, "type":1},
- {"x":4672, "y":193, "type":4},
- {"x":4800, "y":365, "type":1},
- {"x":5531, "y":193, "type":1},
- {"x":7288, "y":365, "type":1}
- ],
- "enemy":[
- {"0":[
- {"x":1120, "y":538, "direction":0, "type":0, "color":0}
- ]},
- {"1":[
- {"x":1920, "y":538, "direction":0, "type":0, "color":0}
- ]},
- {"2":[
- {"x":2320, "y":538, "direction":0, "type":0, "color":0},
- {"x":2380, "y":538, "direction":0, "type":0, "color":0}
- ]},
- {"3":[
- {"x":3640, "y":193, "direction":0, "type":0, "color":0},
- {"x":3700, "y":193, "direction":0, "type":0, "color":0}
- ]},
- {"4":[
- {"x":4270, "y":538, "direction":0, "type":0, "color":0},
- {"x":4330, "y":538, "direction":0, "type":0, "color":0}
- ]},
- {"5":[
- {"x":4700, "y":538, "direction":0, "type":1, "color":1}
- ]},
- {"6":[
- {"x":4900, "y":538, "direction":0, "type":0, "color":0},
- {"x":4960, "y":538, "direction":0, "type":0, "color":0}
- ]},
- {"7":[
- {"x":5300, "y":538, "direction":0, "type":0, "color":0},
- {"x":5360, "y":538, "direction":0, "type":0, "color":0}
- ]},
- {"8":[
- {"x":5600, "y":538, "direction":0, "type":0, "color":0},
- {"x":5660, "y":538, "direction":0, "type":0, "color":0}
- ]},
- {"9":[
- {"x":7550, "y":538, "direction":0, "type":0, "color":0},
- {"x":7610, "y":538, "direction":0, "type":0, "color":0}
- ]}
- ],
- "checkpoint":[
- {"x": 510, "y": 0, "width":10, "height":600, "type":0, "enemy_groupid":0},
- {"x":1400, "y": 0, "width":10, "height":600, "type":0, "enemy_groupid":1},
- {"x":1740, "y": 0, "width":10, "height":600, "type":0, "enemy_groupid":2},
- {"x":3050, "y": 0, "width":10, "height":600, "type":0, "enemy_groupid":3},
- {"x":3750, "y": 0, "width":10, "height":600, "type":0, "enemy_groupid":4},
- {"x":4100, "y": 0, "width":10, "height":600, "type":0, "enemy_groupid":5},
- {"x":4300, "y": 0, "width":10, "height":600, "type":0, "enemy_groupid":6},
- {"x":4700, "y": 0, "width":10, "height":600, "type":0, "enemy_groupid":7},
- {"x":5000, "y": 0, "width":10, "height":600, "type":0, "enemy_groupid":8},
- {"x":6940, "y": 0, "width":100, "height":600, "type":0, "enemy_groupid":9},
- {"x":2460, "y":439, "width":50, "height": 10, "type":6, "map_index":1},
- {"x":8504, "y":-10, "width": 6, "height":600, "type":1},
- {"x":8780, "y": 0, "width":10, "height":600, "type":2},
- {"x":2740, "y":360, "width":40, "height": 12, "type":3},
- {"x":9731, "y":458, "width":10, "height": 70, "type":4},
- {"x":9800, "y":458, "width":10, "height": 70, "type":5, "map_index":2}
- ],
- "flagpole":[
- {"x":8470, "y":116, "type":0},
- {"x":8505, "y": 97, "type":1},
- {"x":8505, "y":137, "type":1},
- {"x":8505, "y":177, "type":1},
- {"x":8505, "y":217, "type":1},
- {"x":8505, "y":257, "type":1},
- {"x":8505, "y":297, "type":1},
- {"x":8505, "y":337, "type":1},
- {"x":8505, "y":377, "type":1},
- {"x":8505, "y":417, "type":1},
- {"x":8505, "y":450, "type":1},
- {"x":8497, "y": 97, "type":2}
- ]
-}
\ No newline at end of file
diff --git a/MARIO-BROS/source/data/maps/level_2.json b/MARIO-BROS/source/data/maps/level_2.json
deleted file mode 100644
index a06cb53..0000000
--- a/MARIO-BROS/source/data/maps/level_2.json
+++ /dev/null
@@ -1,261 +0,0 @@
-{
- "image_name":"level_2",
- "maps":[
- {"start_x": 0, "end_x": 8232, "player_x":110, "player_y": 0},
- {"start_x":8233, "end_x": 9860, "player_x":150, "player_y":451},
- {"start_x":9862, "end_x":10662, "player_x": 50, "player_y": 0}
- ],
- "ground":[
- {"x": 0, "y":540, "width":3426, "height": 60},
- {"x":3560, "y":540, "width":1582, "height": 60},
- {"x":5230, "y":410, "width": 86, "height":190},
- {"x":5404, "y":540, "width": 510, "height": 60},
- {"x":6218, "y":540, "width": 340, "height": 60},
- {"x":6860, "y":540, "width": 730, "height":190},
- {"x":7590, "y":540, "width": 642, "height": 60},
- {"x":8233, "y":540, "width":1627, "height": 60},
- {"x":9862, "y":540, "width": 800, "height": 60}
- ],
- "pipe":[
- {"x":4415, "y":410, "width": 82, "height":130, "type":0},
- {"x":4672, "y":367, "width": 82, "height":170, "type":0},
- {"x":4929, "y":453, "width": 82, "height": 86, "type":0},
- {"x":7114, "y":325, "width":104, "height": 86, "type":2},
- {"x":7632, "y":410, "width": 82, "height":130, "type":1},
- {"x":7802, "y":410, "width":104, "height":130, "type":1},
- {"x":7974, "y":410, "width":104, "height":130, "type":1},
- {"x":8360, "y":453, "width": 82, "height": 86, "type":0},
- {"x":10500, "y":453, "width":104, "height": 86, "type":2}
- ],
- "step":[
- {"x": 730, "y":495, "width": 40, "height": 44},
- {"x": 816, "y":451, "width": 40, "height": 88},
- {"x": 900, "y":410, "width": 40, "height":132},
- {"x": 986, "y":367, "width": 40, "height":176},
- {"x":1072, "y":367, "width": 40, "height":176},
- {"x":1158, "y":410, "width": 40, "height":132},
- {"x":1330, "y":410, "width": 40, "height":132},
- {"x":1416, "y":451, "width": 40, "height": 88},
-
- {"x":5702, "y":496, "width": 40, "height": 44},
- {"x":5745, "y":452, "width": 40, "height": 88},
- {"x":5788, "y":410, "width": 40, "height":132},
- {"x":5831, "y":367, "width": 40, "height":176},
- {"x":5874, "y":367, "width": 40, "height":176},
-
- {"x":7208, "y": 66, "width": 74, "height":344},
-
- {"x":8448, "y":496, "width": 40, "height": 44},
- {"x":8491, "y":452, "width": 40, "height": 88},
- {"x":8534, "y":410, "width": 40, "height":132},
- {"x":8577, "y":367, "width": 40, "height":176},
- {"x":8620, "y":324, "width": 40, "height":220},
- {"x":8663, "y":281, "width": 40, "height":264},
- {"x":8706, "y":237, "width": 40, "height":308},
- {"x":8749, "y":194, "width": 40, "height":352},
- {"x":8792, "y":194, "width": 40, "height":352},
- {"x":9176, "y":496, "width": 40, "height": 44},
-
- {"x":10593, "y":66, "width": 74, "height":474}
- ],
- "slider":[
- {"x":5994, "y": 0, "num":3, "direction":1, "range_start": -50, "range_end": 650, "velocity":1},
- {"x":5994, "y":260, "num":3, "direction":1, "range_start": -50, "range_end": 650, "velocity":1},
- {"x":6642, "y": 0, "num":3, "direction":1, "range_start": -50, "range_end": 650, "velocity":-1},
- {"x":6642, "y":260, "num":3, "direction":1, "range_start": -50, "range_end": 650, "velocity":-1}
- ],
- "coin":[
- {"x":1724, "y":328},
- {"x":1764, "y":200},
- {"x":1808, "y":200},
- {"x":1852, "y":200},
- {"x":1896, "y":200},
- {"x":1936, "y":328},
- {"x":2494, "y":328},
- {"x":2538, "y":328},
- {"x":2580, "y":328},
- {"x":2622, "y":328},
- {"x":2924, "y":328},
- {"x":3608, "y":200},
- {"x":3650, "y":200},
- {"x":3692, "y":200},
- {"x":3734, "y":200},
- {"x":3776, "y":200},
-
- {"x":10126, "y":328},
- {"x":10168, "y":328},
- {"x":10210, "y":328},
- {"x":10252, "y":328},
- {"x":10294, "y":328},
- {"x":10336, "y":328},
- {"x":10378, "y":328},
- {"x":10420, "y":328},
- {"x":10084, "y":500},
- {"x":10126, "y":500},
- {"x":10168, "y":500},
- {"x":10210, "y":500},
- {"x":10252, "y":500},
- {"x":10294, "y":500},
- {"x":10336, "y":500},
- {"x":10378, "y":500},
- {"x":10420, "y":500}
- ],
- "brick":[
- {"x": 0, "y": 66, "type":0, "color":1,"brick_num":11, "direction":1},
- {"x": 254, "y": 66, "type":0, "color":1,"brick_num":83, "direction":0},
- {"x":3816, "y": 66, "type":6, "color":1},
- {"x":3859, "y": 66, "type":0, "color":1,"brick_num":47, "direction":0},
- {"x":1244, "y":324, "type":1, "color":1},
-
- {"x":1672, "y":281, "type":0, "color":1,"brick_num":3, "direction":1},
- {"x":1715, "y":367, "type":0, "color":1},
- {"x":1758, "y":281, "type":0, "color":1,"brick_num":3, "direction":1},
- {"x":1801, "y":281, "type":0, "color":1},
- {"x":1844, "y":281, "type":0, "color":1},
- {"x":1887, "y":281, "type":0, "color":1,"brick_num":3, "direction":1},
- {"x":1930, "y":367, "type":0, "color":1},
- {"x":1973, "y":367, "type":0, "color":1},
- {"x":1973, "y":324, "type":0, "color":1},
- {"x":1973, "y":281, "type":2, "color":1},
-
- {"x":2230, "y":195, "type":0, "color":1,"brick_num":5, "direction":1},
- {"x":2273, "y":195, "type":0, "color":1,"brick_num":5, "direction":1},
- {"x":2316, "y":109, "type":0, "color":1,"brick_num":2, "direction":1},
- {"x":2316, "y":367, "type":0, "color":1,"brick_num":3, "direction":1},
- {"x":2359, "y":109, "type":0, "color":1,"brick_num":2, "direction":1},
- {"x":2359, "y":367, "type":0, "color":1,"brick_num":3, "direction":1},
-
- {"x":2487, "y":109, "type":0, "color":1,"brick_num":6, "direction":0},
- {"x":2487, "y":152, "type":0, "color":1,"brick_num":6, "direction":0},
- {"x":2659, "y":195, "type":0, "color":1,"brick_num":2, "direction":0},
- {"x":2659, "y":238, "type":0, "color":1,"brick_num":2, "direction":0},
- {"x":2659, "y":281, "type":0, "color":1,"brick_num":2, "direction":0},
- {"x":2659, "y":324, "type":0, "color":1,"brick_num":2, "direction":0},
- {"x":2487, "y":367, "type":0, "color":1,"brick_num":6, "direction":0},
-
- {"x":2830, "y":109, "type":0, "color":1,"brick_num":3, "direction":0},
- {"x":2830, "y":152, "type":0, "color":1,"brick_num":3, "direction":0},
- {"x":2873, "y":195, "type":0, "color":1,"brick_num":5, "direction":1},
- {"x":2916, "y":367, "type":0, "color":1},
- {"x":2959, "y":367, "type":0, "color":1},
- {"x":2958, "y":324, "type":4, "color":1},
-
- {"x":3087, "y":195, "type":0, "color":1,"brick_num":5, "direction":1},
- {"x":3130, "y":195, "type":0, "color":1,"brick_num":5, "direction":1},
-
- {"x":3259, "y":195, "type":0, "color":1,"brick_num":4, "direction":0},
- {"x":3259, "y":238, "type":0, "color":1,"brick_num":4, "direction":0},
- {"x":3259, "y":367, "type":0, "color":1,"brick_num":4, "direction":0},
-
- {"x":3602, "y":281, "type":0, "color":1,"brick_num":6, "direction":0},
- {"x":3602, "y":324, "type":0, "color":1,"brick_num":6, "direction":0},
-
- {"x":6218, "y":324, "type":0, "color":1,"brick_num":5, "direction":0},
- {"x":6433, "y":324, "type":4, "color":1},
-
- {"x":6860, "y":410, "type":0, "color":1,"brick_num":17, "direction":0},
- {"x":6860, "y":453, "type":0, "color":1,"brick_num":17, "direction":0},
- {"x":6860, "y":496, "type":0, "color":1,"brick_num":17, "direction":0},
- {"x":6903, "y": 66, "type":0, "color":1,"brick_num":7, "direction":0},
- {"x":7290, "y": 66, "type":0, "color":1,"brick_num":17, "direction":0},
- {"x":7290, "y":109, "type":0, "color":1,"brick_num":7, "direction":0},
- {"x":7290, "y":152, "type":0, "color":1,"brick_num":7, "direction":0},
- {"x":7290, "y":195, "type":0, "color":1,"brick_num":7, "direction":0},
- {"x":7290, "y":238, "type":0, "color":1,"brick_num":7, "direction":0},
- {"x":7290, "y":281, "type":0, "color":1,"brick_num":7, "direction":0},
- {"x":7290, "y":324, "type":0, "color":1,"brick_num":7, "direction":0},
- {"x":7290, "y":367, "type":0, "color":1,"brick_num":7, "direction":0},
- {"x":8140, "y": 66, "type":0, "color":1,"brick_num":11, "direction":1},
- {"x":8183, "y": 66, "type":0, "color":1,"brick_num":11, "direction":1},
-
- {"x":9863, "y": 66, "type":0, "color":1,"brick_num":11, "direction":1},
- {"x":9992, "y": 66, "type":0, "color":1,"brick_num":12, "direction":0},
- {"x":9992, "y":109, "type":0, "color":1,"brick_num":12, "direction":0},
- {"x":9992, "y":152, "type":0, "color":1,"brick_num":12, "direction":0},
- {"x":9992, "y":195, "type":0, "color":1,"brick_num":12, "direction":0},
- {"x":9992, "y":367, "type":0, "color":1,"brick_num":12, "direction":0},
- {"x":10508, "y": 66, "type":0, "color":1,"brick_num":9, "direction":1},
- {"x":10551, "y": 66, "type":0, "color":1,"brick_num":9, "direction":1}
- ],
- "box":[
- {"x": 426, "y":367, "type":3},
- {"x": 470, "y":367, "type":1},
- {"x": 514, "y":367, "type":1},
- {"x": 556, "y":367, "type":1},
- {"x": 598, "y":367, "type":1}
- ],
- "enemy":[
- {"0":[
- {"x": 685, "y":540, "direction":0, "type":0, "color":1},
- {"x": 730, "y":495, "direction":0, "type":0, "color":1}
- ]},
- {"1":[
- {"x":1260, "y":540, "direction":0, "type":0, "color":1}
- ]},
- {"2":[
- {"x":2040, "y":538, "direction":0, "type":1, "color":0},
- {"x":2100, "y":538, "direction":0, "type":1, "color":0}
- ]},
- {"3":[
- {"x":2670, "y":538, "direction":0, "type":1, "color":0},
- {"x":2800, "y":538, "direction":0, "type":0, "color":1},
- {"x":2880, "y":538, "direction":0, "type":0, "color":1}
- ]},
- {"4":[
- {"x":3130, "y":195, "direction":0, "type":0, "color":1}
- ]},
- {"5":[
- {"x":3330, "y":367, "direction":0, "type":0, "color":1},
- {"x":3400, "y":367, "direction":0, "type":0, "color":1}
- ]},
- {"6":[
- {"x":4246, "y":538, "direction":0, "type":0, "color":1},
- {"x":4306, "y":538, "direction":0, "type":0, "color":1},
- {"x":4366, "y":538, "direction":0, "type":0, "color":1}
- ]},
- {"7":[
- {"x":4440, "y":490, "direction":0, "type":3, "color":0, "range":1, "range_start":360, "range_end":490},
- {"x":4696, "y":445, "direction":0, "type":3, "color":0, "range":1, "range_start":315, "range_end":445},
- {"x":4954, "y":535, "direction":0, "type":3, "color":0, "range":1, "range_start":400, "range_end":535}
- ]},
- {"8":[
- {"x":4890, "y":538, "direction":0, "type":0, "color":1}
- ]},
- {"9":[
- {"x":5786, "y":410, "direction":0, "type":0, "color":1},
- {"x":5846, "y":367, "direction":0, "type":0, "color":1}
- ]},
- {"10":[
- {"x":6500, "y":538, "direction":0, "type":1, "color":2, "range":1, "range_start":6220, "range_end":6755}
- ]},
- {"11":[
- {"x":8383, "y":535, "direction":0, "type":3, "color":0, "range":1, "range_start":400, "range_end":535}
- ]}
- ],
- "checkpoint":[
- {"x": 110, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":0},
- {"x": 728, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":1},
- {"x":1400, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":2},
- {"x":2070, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":3},
- {"x":2530, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":4},
- {"x":2730, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":5},
- {"x":3646, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":6},
- {"x":3800, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":7},
- {"x":4290, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":8},
- {"x":5186, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":9},
- {"x":5900, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":10},
- {"x":8383, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":11},
- {"x":7117, "y":330, "width":10, "height":80, "type":4},
- {"x":7187, "y":330, "width":10, "height":80, "type":5, "map_index":1},
- {"x":7634, "y":540, "width":78, "height":10, "type":6, "map_index":2},
- {"x":7804, "y":540, "width":78, "height":10, "type":6, "map_index":2},
- {"x":7976, "y":540, "width":78, "height":10, "type":6, "map_index":2},
- {"x":9195, "y":-15, "width":5, "height":600, "type":1},
- {"x":9470, "y":0, "width":10, "height":600, "type":2},
- {"x":10502, "y":460, "width":10, "height":80, "type":4},
- {"x":10572, "y":460, "width":10, "height":80, "type":5, "map_index":1}
- ],
- "flagpole":[
- {"x":9156, "y":116, "type":0}
- ]
-}
\ No newline at end of file
diff --git a/MARIO-BROS/source/data/maps/level_3.json b/MARIO-BROS/source/data/maps/level_3.json
deleted file mode 100644
index d4c3477..0000000
--- a/MARIO-BROS/source/data/maps/level_3.json
+++ /dev/null
@@ -1,121 +0,0 @@
-{
- "image_name":"level_3",
- "ground":[
- {"x": 0, "y":538, "width": 686, "height": 60},
- {"x": 774, "y":496, "width": 166, "height": 36},
- {"x":1031, "y":368, "width": 340, "height": 36},
- {"x":1074, "y":406, "width": 252, "height":194},
- {"x":1118, "y":196, "width": 208, "height": 36},
- {"x":1374, "y":496, "width": 126, "height": 36},
- {"x":1504, "y":325, "width": 208, "height": 36},
- {"x":1544, "y":360, "width": 126, "height":240},
- {"x":1716, "y":153, "width": 296, "height": 36},
- {"x":1760, "y":190, "width": 208, "height":410},
- {"x":2146, "y":538, "width": 166, "height": 36},
- {"x":2534, "y":538, "width": 208, "height": 36},
- {"x":2574, "y":198, "width": 166, "height": 36},
- {"x":2790, "y":538, "width": 208, "height": 36},
- {"x":3002, "y":366, "width": 126, "height": 36},
- {"x":3044, "y":406, "width": 40, "height":194},
- {"x":3262, "y":238, "width": 252, "height": 36},
- {"x":3304, "y":274, "width": 166, "height":326},
- {"x":4204, "y":452, "width": 166, "height": 36},
- {"x":4246, "y":488, "width": 84, "height":112},
- {"x":4462, "y":282, "width": 338, "height": 36},
- {"x":4502, "y":318, "width": 252, "height":282},
- {"x":4847, "y":538, "width": 126, "height": 60},
- {"x":4976, "y":368, "width": 166, "height": 36},
- {"x":5018, "y":406, "width": 84, "height":194},
- {"x":5232, "y":368, "width": 166, "height": 36},
- {"x":5274, "y":406, "width": 84, "height":194},
- {"x":5532, "y":538, "width":1508, "height": 60}
- ],
- "step":[
- {"x":5917, "y":366, "width": 80, "height":176},
- {"x":6002, "y":280, "width": 80, "height":264},
- {"x":6090, "y":194, "width": 80, "height":352},
- {"x":6516, "y":495, "width": 40, "height": 44}
- ],
- "slider":[
- {"x":2400, "y":338, "num":3, "direction":1, "range_start": 238, "range_end": 560},
- {"x":3590, "y":322, "num":3, "direction":0, "range_start":3590, "range_end":3750},
- {"x":3790, "y":366, "num":3, "direction":0, "range_start":3790, "range_end":3950},
- {"x":5440, "y":238, "num":3, "direction":0, "range_start":5440, "range_end":5600}
- ],
- "coin":[
- {"x":1166, "y":156},
- {"x":1208, "y":156},
- {"x":1250, "y":156},
- {"x":1594, "y": 70},
- {"x":1636, "y": 70},
- {"x":2152, "y":240},
- {"x":2194, "y":240},
- {"x":2580, "y":156},
- {"x":2622, "y":156},
- {"x":2664, "y":156},
- {"x":2706, "y":156},
- {"x":3652, "y":198},
- {"x":3694, "y":198},
- {"x":3996, "y":156},
- {"x":4038, "y":156},
- {"x":4166, "y":156},
- {"x":4208, "y":156},
- {"x":4852, "y":496},
- {"x":4894, "y":496},
- {"x":4936, "y":496},
- {"x":5154, "y":198},
- {"x":5196, "y":198}
- ],
- "box":[
- {"x":2530, "y":408, "type":3}
- ],
- "enemy":[
- {"0":[
- {"x":1284, "y":196, "direction":0, "type":1, "color":2, "range":1, "range_start":1114, "range_end":1324}
- ]},
- {"1":[
- {"x":1886, "y":152, "direction":0, "type":0, "color":0},
- {"x":1946, "y":152, "direction":0, "type":0, "color":0}
- ]},
- {"2":[
- {"x":3160, "y":220, "direction":0, "type":2, "color":2, "range":1, "range_start":200, "range_end":440, "is_vertical":1}
- ]},
- {"3":[
- {"x":3458, "y":238, "direction":0, "type":0, "color":0, "range":1, "range_start":3262, "range_end":3508}
- ]},
- {"4":[
- {"x":4740, "y":282, "direction":0, "type":1, "color":2, "range":1, "range_start":4460, "range_end":4798}
- ]},
- {"5":[
- {"x":4880, "y":260, "direction":0, "type":2, "color":2, "range":1, "range_start":230, "range_end":490, "is_vertical":1}
- ]},
- {"6":[
- {"x":5836, "y":538, "direction":0, "type":1, "color":2, "range":1, "range_start":5530, "range_end":5908}
- ]}
- ],
- "checkpoint":[
- {"x": 690, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":0},
- {"x":1292, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":1},
- {"x":2300, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":2},
- {"x":2870, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":3},
- {"x":4154, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":4},
- {"x":4466, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":5},
- {"x":5246, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":6},
- {"x":6536, "y":-15, "width": 6, "height":600, "type":1, "enemy_groupid":0},
- {"x":6853, "y":0, "width":10, "height":600, "type":2, "enemy_groupid":0}
- ],
- "flagpole":[
- {"x":6497, "y":116, "type":0},
- {"x":8505, "y": 97, "type":1},
- {"x":8505, "y":137, "type":1},
- {"x":8505, "y":177, "type":1},
- {"x":8505, "y":217, "type":1},
- {"x":8505, "y":257, "type":1},
- {"x":8505, "y":297, "type":1},
- {"x":8505, "y":337, "type":1},
- {"x":8505, "y":377, "type":1},
- {"x":8505, "y":417, "type":1},
- {"x":8505, "y":450, "type":1},
- {"x":8497, "y": 97, "type":2}
- ]
-}
\ No newline at end of file
diff --git a/MARIO-BROS/source/data/maps/level_4.json b/MARIO-BROS/source/data/maps/level_4.json
deleted file mode 100644
index 6052be5..0000000
--- a/MARIO-BROS/source/data/maps/level_4.json
+++ /dev/null
@@ -1,87 +0,0 @@
-{
- "image_name":"level_4",
- "maps":[
- {"start_x": 0, "end_x": 6844, "player_x":110, "player_y": 275}
- ],
- "ground":[
- {"x": 0, "y":409, "width": 556, "height":191},
- {"x": 0, "y":366, "width": 215, "height": 43},
- {"x": 0, "y":323, "width": 172, "height": 43},
- {"x": 0, "y":280, "width": 129, "height": 43},
- {"x": 623, "y":409, "width": 470, "height":191},
- {"x":1222, "y":409, "width": 129, "height":191},
- {"x":1480, "y":409, "width":2956, "height":191},
- {"x":1480, "y":366, "width":1584, "height": 43},
- {"x":4436, "y":537, "width":1031, "height": 60},
- {"x":4952, "y":409, "width": 170, "height":130},
- {"x":5252, "y":409, "width": 213, "height":130},
- {"x":6024, "y":366, "width": 126, "height":170},
- {"x":6024, "y":537, "width": 820, "height": 60}
- ],
- "step":[
- {"x": 0, "y": 63, "width":1008, "height":127},
- {"x": 966, "y":190, "width": 41, "height": 87},
- {"x":1008, "y": 63, "width": 556, "height": 41},
- {"x":1566, "y": 63, "width":1502, "height":170},
- {"x":1566, "y":234, "width": 41, "height": 41},
- {"x":2080, "y":234, "width": 41, "height": 43},
- {"x":2552, "y":234, "width": 41, "height": 43},
- {"x":2852, "y":234, "width": 41, "height": 43},
- {"x":3066, "y": 63, "width":3778, "height": 40},
- {"x":3238, "y":366, "width": 41, "height": 43},
- {"x":3409, "y":104, "width": 41, "height": 86},
- {"x":3581, "y":366, "width": 41, "height": 43},
- {"x":3752, "y":104, "width": 41, "height": 86},
- {"x":3924, "y":366, "width": 41, "height": 43},
- {"x":3580, "y":366, "width": 41, "height": 43},
- {"x":4138, "y":104, "width": 297, "height": 86},
- {"x":5252, "y":104, "width": 213, "height": 86},
- {"x":6067, "y":104 , "width": 84, "height":128},
-
- {"x":5468, "y":409 , "width": 540, "height":44}
- ],
- "slider":[
- {"x":5750, "y":238, "num":2, "direction":0, "range_start":5720, "range_end":5930}
- ],
- "box":[
- {"x":1266, "y":236, "type":3}
- ],
- "enemy":[
- {"0":[
- {"x":1275, "y":422, "direction":0, "type":4, "color":0, "num":6}
- ]},
- {"1":[
- {"x":2091, "y":249, "direction":0, "type":4, "color":0, "num":6}
- ]},
- {"2":[
- {"x":2562, "y":249, "direction":0, "type":4, "color":0, "num":6}
- ]},
- {"3":[
- {"x":2862, "y":249, "direction":0, "type":4, "color":0, "num":6}
- ]},
- {"4":[
- {"x":3250, "y":380, "direction":0, "type":4, "color":0, "num":6}
- ]},
- {"5":[
- {"x":3592, "y":380, "direction":0, "type":4, "color":0, "num":6}
- ]},
- {"6":[
- {"x":3762, "y":163, "direction":0, "type":4, "color":0, "num":6}
- ]},
- {"7":[
- {"x":5880, "y":405, "direction":0, "type":5, "color":0, "range":1, "range_start":5750, "range_end":5975}
- ]}
- ],
- "checkpoint":[
- {"x": 577, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":0},
- {"x":1050, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":1},
- {"x":1700, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":2},
- {"x":2162, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":3},
- {"x":2550, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":4},
- {"x":2892, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":5},
- {"x":3062, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":6},
- {"x":3900, "y":0, "width":10, "height":600, "type":0, "enemy_groupid":7},
- {"x":6026, "y":324, "width":40, "height":40, "type":7, "enemy_groupid":0},
- {"x":6510, "y":0, "width":10, "height":600, "type":2, "enemy_groupid":0}
- ]
-}
\ No newline at end of file
diff --git a/MARIO-BROS/source/data/player/luigi.json b/MARIO-BROS/source/data/player/luigi.json
deleted file mode 100644
index 7aa9e52..0000000
--- a/MARIO-BROS/source/data/player/luigi.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- "image_name":"mario_bros",
- "image_frames":{
- "right_small_normal":[
- {"x":178, "y":128, "width":12, "height":16},
- {"x": 80, "y":128, "width":15, "height":16},
- {"x": 96, "y":128, "width":16, "height":16},
- {"x":112, "y":128, "width":16, "height":16},
- {"x":144, "y":128, "width":16, "height":16},
- {"x":130, "y":128, "width":14, "height":16},
- {"x":160, "y":128, "width":15, "height":16},
- {"x":320, "y":105, "width":16, "height":24},
- {"x":241, "y":129, "width":16, "height":16},
- {"x":194, "y":128, "width":12, "height":16},
- {"x":210, "y":129, "width":12, "height":16}
- ],
- "right_big_normal":[
- {"x":176, "y": 96, "width":16, "height":32},
- {"x": 81, "y": 96, "width":16, "height":32},
- {"x": 97, "y": 96, "width":15, "height":32},
- {"x":113, "y": 96, "width":15, "height":32},
- {"x":144, "y": 96, "width":16, "height":32},
- {"x":128, "y": 96, "width":16, "height":32},
- {"x":336, "y": 96, "width":16, "height":32},
- {"x":160, "y":106, "width":16, "height":22},
- {"x":272, "y": 98, "width":16, "height":29},
- {"x":193, "y": 98, "width":16, "height":29},
- {"x":209, "y": 98, "width":16, "height":29}
- ],
- "right_big_fire":[
- {"x":176, "y":192, "width":16, "height":32},
- {"x": 81, "y":192, "width":16, "height":32},
- {"x": 97, "y":192, "width":15, "height":32},
- {"x":113, "y":192, "width":15, "height":32},
- {"x":144, "y":192, "width":16, "height":32},
- {"x":128, "y":192, "width":16, "height":32},
- {"x":336, "y":192, "width":16, "height":32},
- {"x":160, "y":202, "width":16, "height":22},
- {"x":272, "y":194, "width":16, "height":29},
- {"x":193, "y":194, "width":16, "height":29},
- {"x":209, "y":194, "width":16, "height":29}
- ]
- },
- "speed":{
- "max_walk_speed":6,
- "max_run_speed":12,
- "max_y_velocity":11,
- "walk_accel":0.15,
- "run_accel":0.3,
- "jump_velocity":-10.5
- }
-
-}
\ No newline at end of file
diff --git a/MARIO-BROS/source/data/player/mario.json b/MARIO-BROS/source/data/player/mario.json
deleted file mode 100644
index 25948f0..0000000
--- a/MARIO-BROS/source/data/player/mario.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- "image_name":"mario_bros",
- "image_frames":{
- "right_small_normal":[
- {"x":178, "y": 32, "width":12, "height":16},
- {"x": 80, "y": 32, "width":15, "height":16},
- {"x": 96, "y": 32, "width":16, "height":16},
- {"x":112, "y": 32, "width":16, "height":16},
- {"x":144, "y": 32, "width":16, "height":16},
- {"x":130, "y": 32, "width":14, "height":16},
- {"x":160, "y": 32, "width":15, "height":16},
- {"x":320, "y": 8, "width":16, "height":24},
- {"x":241, "y": 33, "width":16, "height":16},
- {"x":194, "y": 32, "width":12, "height":16},
- {"x":210, "y": 33, "width":12, "height":16}
- ],
- "right_big_normal":[
- {"x":176, "y": 0, "width":16, "height":32},
- {"x": 81, "y": 0, "width":16, "height":32},
- {"x": 97, "y": 0, "width":15, "height":32},
- {"x":113, "y": 0, "width":15, "height":32},
- {"x":144, "y": 0, "width":16, "height":32},
- {"x":128, "y": 0, "width":16, "height":32},
- {"x":336, "y": 0, "width":16, "height":32},
- {"x":160, "y": 10, "width":16, "height":22},
- {"x":272, "y": 2, "width":16, "height":29},
- {"x":193, "y": 2, "width":16, "height":29},
- {"x":209, "y": 2, "width":16, "height":29}
- ],
- "right_big_fire":[
- {"x":176, "y": 48, "width":16, "height":32},
- {"x": 81, "y": 48, "width":16, "height":32},
- {"x": 97, "y": 48, "width":15, "height":32},
- {"x":113, "y": 48, "width":15, "height":32},
- {"x":144, "y": 48, "width":16, "height":32},
- {"x":128, "y": 48, "width":16, "height":32},
- {"x":336, "y": 48, "width":16, "height":32},
- {"x":160, "y": 58, "width":16, "height":22},
- {"x":272, "y": 50, "width":16, "height":29},
- {"x":193, "y": 50, "width":16, "height":29},
- {"x":209, "y": 50, "width":16, "height":29}
- ]
- },
- "speed":{
- "max_walk_speed":6,
- "max_run_speed":12,
- "max_y_velocity":11,
- "walk_accel":0.15,
- "run_accel":0.3,
- "jump_velocity":-10.5
- }
-
-}
\ No newline at end of file
diff --git a/MARIO-BROS/source/main.py b/MARIO-BROS/source/main.py
deleted file mode 100644
index 6d74926..0000000
--- a/MARIO-BROS/source/main.py
+++ /dev/null
@@ -1,14 +0,0 @@
-import pygame as pg
-from . import setup, tools
-from . import constants as c
-from .states import main_menu, load_screen, level
-
-def main():
- game = tools.Control()
- state_dict = {c.MAIN_MENU: main_menu.Menu(),
- c.LOAD_SCREEN: load_screen.LoadScreen(),
- c.LEVEL: level.Level(),
- c.GAME_OVER: load_screen.GameOver(),
- c.TIME_OUT: load_screen.TimeOut()}
- game.setup_states(state_dict, c.MAIN_MENU)
- game.main()
diff --git a/MARIO-BROS/source/setup.py b/MARIO-BROS/source/setup.py
deleted file mode 100644
index 02c9395..0000000
--- a/MARIO-BROS/source/setup.py
+++ /dev/null
@@ -1,12 +0,0 @@
-import os
-import pygame as pg
-from . import constants as c
-from . import tools
-
-pg.init()
-pg.event.set_allowed([pg.KEYDOWN, pg.KEYUP, pg.QUIT])
-pg.display.set_caption(c.ORIGINAL_CAPTION)
-SCREEN = pg.display.set_mode(c.SCREEN_SIZE)
-SCREEN_RECT = SCREEN.get_rect()
-
-GFX = tools.load_all_gfx(os.path.join("resources","graphics"))
\ No newline at end of file
diff --git a/MARIO-BROS/source/states/__init__.py b/MARIO-BROS/source/states/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/MARIO-BROS/source/states/__pycache__/__init__.cpython-39.pyc b/MARIO-BROS/source/states/__pycache__/__init__.cpython-39.pyc
deleted file mode 100644
index 0624aa1..0000000
Binary files a/MARIO-BROS/source/states/__pycache__/__init__.cpython-39.pyc and /dev/null differ
diff --git a/MARIO-BROS/source/states/__pycache__/level.cpython-39.pyc b/MARIO-BROS/source/states/__pycache__/level.cpython-39.pyc
deleted file mode 100644
index 34c0702..0000000
Binary files a/MARIO-BROS/source/states/__pycache__/level.cpython-39.pyc and /dev/null differ
diff --git a/MARIO-BROS/source/states/__pycache__/load_screen.cpython-39.pyc b/MARIO-BROS/source/states/__pycache__/load_screen.cpython-39.pyc
deleted file mode 100644
index 59f8c95..0000000
Binary files a/MARIO-BROS/source/states/__pycache__/load_screen.cpython-39.pyc and /dev/null differ
diff --git a/MARIO-BROS/source/states/__pycache__/main_menu.cpython-39.pyc b/MARIO-BROS/source/states/__pycache__/main_menu.cpython-39.pyc
deleted file mode 100644
index 01ccfdb..0000000
Binary files a/MARIO-BROS/source/states/__pycache__/main_menu.cpython-39.pyc and /dev/null differ
diff --git a/MARIO-BROS/source/states/level.py b/MARIO-BROS/source/states/level.py
deleted file mode 100644
index fe10366..0000000
--- a/MARIO-BROS/source/states/level.py
+++ /dev/null
@@ -1,614 +0,0 @@
-import os
-import json
-import pygame as pg
-from .. import setup, tools
-from .. import constants as c
-from ..components import info, stuff, player, brick, box, enemy, powerup, coin
-
-
-class Level(tools.State):
- def __init__(self):
- tools.State.__init__(self)
- self.player = None
-
- def startup(self, current_time, persist):
- self.game_info = persist
- self.persist = self.game_info
- self.game_info[c.CURRENT_TIME] = current_time
- self.death_timer = 0
- self.castle_timer = 0
-
- self.moving_score_list = []
- self.overhead_info = info.Info(self.game_info, c.LEVEL)
- self.load_map()
- self.setup_background()
- self.setup_maps()
- self.ground_group = self.setup_collide(c.MAP_GROUND)
- self.step_group = self.setup_collide(c.MAP_STEP)
- self.setup_pipe()
- self.setup_slider()
- self.setup_static_coin()
- self.setup_brick_and_box()
- self.setup_player()
- self.setup_enemies()
- self.setup_checkpoints()
- self.setup_flagpole()
- self.setup_sprite_groups()
-
- def load_map(self):
- map_file = 'level_' + str(self.game_info[c.LEVEL_NUM]) + '.json'
- file_path = os.path.join('source', 'data', 'maps', map_file)
- f = open(file_path)
- self.map_data = json.load(f)
- f.close()
-
- def setup_background(self):
- img_name = self.map_data[c.MAP_IMAGE]
- self.background = setup.GFX[img_name]
- self.bg_rect = self.background.get_rect()
- self.background = pg.transform.scale(self.background,
- (int(self.bg_rect.width*c.BACKGROUND_MULTIPLER),
- int(self.bg_rect.height*c.BACKGROUND_MULTIPLER)))
- self.bg_rect = self.background.get_rect()
-
- self.level = pg.Surface((self.bg_rect.w, self.bg_rect.h)).convert()
- self.viewport = setup.SCREEN.get_rect(bottom=self.bg_rect.bottom)
-
- def setup_maps(self):
- self.map_list = []
- if c.MAP_MAPS in self.map_data:
- for data in self.map_data[c.MAP_MAPS]:
- self.map_list.append(
- (data['start_x'], data['end_x'], data['player_x'], data['player_y']))
- self.start_x, self.end_x, self.player_x, self.player_y = self.map_list[0]
- else:
- self.start_x = 0
- self.end_x = self.bg_rect.w
- self.player_x = 110
- self.player_y = c.GROUND_HEIGHT
-
- def change_map(self, index, type):
- self.start_x, self.end_x, self.player_x, self.player_y = self.map_list[index]
- self.viewport.x = self.start_x
- if type == c.CHECKPOINT_TYPE_MAP:
- self.player.rect.x = self.viewport.x + self.player_x
- self.player.rect.bottom = self.player_y
- self.player.state = c.STAND
- elif type == c.CHECKPOINT_TYPE_PIPE_UP:
- self.player.rect.x = self.viewport.x + self.player_x
- self.player.rect.bottom = c.GROUND_HEIGHT
- self.player.state = c.UP_OUT_PIPE
- self.player.up_pipe_y = self.player_y
-
- def setup_collide(self, name):
- group = pg.sprite.Group()
- if name in self.map_data:
- for data in self.map_data[name]:
- group.add(stuff.Collider(data['x'], data['y'],
- data['width'], data['height'], name))
- return group
-
- def setup_pipe(self):
- self.pipe_group = pg.sprite.Group()
- if c.MAP_PIPE in self.map_data:
- for data in self.map_data[c.MAP_PIPE]:
- self.pipe_group.add(stuff.Pipe(data['x'], data['y'],
- data['width'], data['height'], data['type']))
-
- def setup_slider(self):
- self.slider_group = pg.sprite.Group()
- if c.MAP_SLIDER in self.map_data:
- for data in self.map_data[c.MAP_SLIDER]:
- if c.VELOCITY in data:
- vel = data[c.VELOCITY]
- else:
- vel = 1
- self.slider_group.add(stuff.Slider(data['x'], data['y'], data['num'],
- data['direction'], data['range_start'], data['range_end'], vel))
-
- def setup_static_coin(self):
- self.static_coin_group = pg.sprite.Group()
- if c.MAP_COIN in self.map_data:
- for data in self.map_data[c.MAP_COIN]:
- self.static_coin_group.add(
- coin.StaticCoin(data['x'], data['y']))
-
- def setup_brick_and_box(self):
- self.coin_group = pg.sprite.Group()
- self.powerup_group = pg.sprite.Group()
- self.brick_group = pg.sprite.Group()
- self.brickpiece_group = pg.sprite.Group()
-
- if c.MAP_BRICK in self.map_data:
- for data in self.map_data[c.MAP_BRICK]:
- brick.create_brick(self.brick_group, data, self)
-
- self.box_group = pg.sprite.Group()
- if c.MAP_BOX in self.map_data:
- for data in self.map_data[c.MAP_BOX]:
- if data['type'] == c.TYPE_COIN:
- self.box_group.add(
- box.Box(data['x'], data['y'], data['type'], self.coin_group))
- else:
- self.box_group.add(
- box.Box(data['x'], data['y'], data['type'], self.powerup_group))
-
- def setup_player(self):
- if self.player is None:
- self.player = player.Player(self.game_info[c.PLAYER_NAME])
- else:
- self.player.restart()
- self.player.rect.x = self.viewport.x + self.player_x
- self.player.rect.bottom = self.player_y
- if c.DEBUG:
- self.player.rect.x = self.viewport.x + c.DEBUG_START_X
- self.player.rect.bottom = c.DEBUG_START_y
- self.viewport.x = self.player.rect.x - 110
-
- def setup_enemies(self):
- self.enemy_group_list = []
- index = 0
- for data in self.map_data[c.MAP_ENEMY]:
- group = pg.sprite.Group()
- for item in data[str(index)]:
- group.add(enemy.create_enemy(item, self))
- self.enemy_group_list.append(group)
- index += 1
-
- def setup_checkpoints(self):
- self.checkpoint_group = pg.sprite.Group()
- for data in self.map_data[c.MAP_CHECKPOINT]:
- if c.ENEMY_GROUPID in data:
- enemy_groupid = data[c.ENEMY_GROUPID]
- else:
- enemy_groupid = 0
- if c.MAP_INDEX in data:
- map_index = data[c.MAP_INDEX]
- else:
- map_index = 0
- self.checkpoint_group.add(stuff.Checkpoint(data['x'], data['y'], data['width'],
- data['height'], data['type'], enemy_groupid, map_index))
-
- def setup_flagpole(self):
- self.flagpole_group = pg.sprite.Group()
- if c.MAP_FLAGPOLE in self.map_data:
- for data in self.map_data[c.MAP_FLAGPOLE]:
- if data['type'] == c.FLAGPOLE_TYPE_FLAG:
- sprite = stuff.Flag(data['x'], data['y'])
- self.flag = sprite
- elif data['type'] == c.FLAGPOLE_TYPE_POLE:
- sprite = stuff.Pole(data['x'], data['y'])
- else:
- sprite = stuff.PoleTop(data['x'], data['y'])
- self.flagpole_group.add(sprite)
-
- def setup_sprite_groups(self):
- self.dying_group = pg.sprite.Group()
- self.enemy_group = pg.sprite.Group()
- self.shell_group = pg.sprite.Group()
-
- self.ground_step_pipe_group = pg.sprite.Group(self.ground_group,
- self.pipe_group, self.step_group, self.slider_group)
- self.player_group = pg.sprite.Group(self.player)
-
- def update(self, surface, keys, current_time):
- self.game_info[c.CURRENT_TIME] = self.current_time = current_time
- self.handle_states(keys)
- self.draw(surface)
-
- def handle_states(self, keys):
- self.update_all_sprites(keys)
-
- def update_all_sprites(self, keys):
- if self.player.dead:
- self.player.update(keys, self.game_info, self.powerup_group)
- if self.current_time - self.death_timer > 3000:
- self.update_game_info()
- self.done = True
- elif self.player.state == c.IN_CASTLE:
- self.player.update(keys, self.game_info, None)
- self.flagpole_group.update()
- if self.current_time - self.castle_timer > 2000:
- self.update_game_info()
- self.done = True
- elif self.in_frozen_state():
- self.player.update(keys, self.game_info, None)
- self.check_checkpoints()
- self.update_viewport()
- self.overhead_info.update(self.game_info, self.player)
- for score in self.moving_score_list:
- score.update(self.moving_score_list)
- else:
- self.player.update(keys, self.game_info, self.powerup_group)
- self.flagpole_group.update()
- self.check_checkpoints()
- self.slider_group.update()
- self.static_coin_group.update(self.game_info)
- self.enemy_group.update(self.game_info, self)
- self.shell_group.update(self.game_info, self)
- self.brick_group.update()
- self.box_group.update(self.game_info)
- self.powerup_group.update(self.game_info, self)
- self.coin_group.update(self.game_info)
- self.brickpiece_group.update()
- self.dying_group.update(self.game_info, self)
- self.update_player_position()
- self.check_for_player_death()
- self.update_viewport()
- self.overhead_info.update(self.game_info, self.player)
- for score in self.moving_score_list:
- score.update(self.moving_score_list)
-
- def check_checkpoints(self):
- checkpoint = pg.sprite.spritecollideany(
- self.player, self.checkpoint_group)
-
- if checkpoint:
- if checkpoint.type == c.CHECKPOINT_TYPE_ENEMY:
- group = self.enemy_group_list[checkpoint.enemy_groupid]
- self.enemy_group.add(group)
- elif checkpoint.type == c.CHECKPOINT_TYPE_FLAG:
- self.player.state = c.FLAGPOLE
- if self.player.rect.bottom < self.flag.rect.y:
- self.player.rect.bottom = self.flag.rect.y
- self.flag.state = c.SLIDE_DOWN
- self.update_flag_score()
- elif checkpoint.type == c.CHECKPOINT_TYPE_CASTLE:
- self.player.state = c.IN_CASTLE
- self.player.x_vel = 0
- self.castle_timer = self.current_time
- self.flagpole_group.add(stuff.CastleFlag(8745, 322))
- elif (checkpoint.type == c.CHECKPOINT_TYPE_MUSHROOM and
- self.player.y_vel < 0):
- mushroom_box = box.Box(checkpoint.rect.x, checkpoint.rect.bottom - 40,
- c.TYPE_LIFEMUSHROOM, self.powerup_group)
- mushroom_box.start_bump(self.moving_score_list)
- self.box_group.add(mushroom_box)
- self.player.y_vel = 7
- self.player.rect.y = mushroom_box.rect.bottom
- self.player.state = c.FALL
- elif checkpoint.type == c.CHECKPOINT_TYPE_PIPE:
- self.player.state = c.WALK_AUTO
- elif checkpoint.type == c.CHECKPOINT_TYPE_PIPE_UP:
- self.change_map(checkpoint.map_index, checkpoint.type)
- elif checkpoint.type == c.CHECKPOINT_TYPE_MAP:
- self.change_map(checkpoint.map_index, checkpoint.type)
- elif checkpoint.type == c.CHECKPOINT_TYPE_BOSS:
- self.player.state = c.WALK_AUTO
- checkpoint.kill()
-
- def update_flag_score(self):
- base_y = c.GROUND_HEIGHT - 80
-
- y_score_list = [(base_y, 100), (base_y-120, 400),
- (base_y-200, 800), (base_y-320, 2000),
- (0, 5000)]
- for y, score in y_score_list:
- if self.player.rect.y > y:
- self.update_score(score, self.flag)
- break
-
- def update_player_position(self):
- if self.player.state == c.UP_OUT_PIPE:
- return
-
- self.player.rect.x += round(self.player.x_vel)
- if self.player.rect.x < self.start_x:
- self.player.rect.x = self.start_x
- elif self.player.rect.right > self.end_x:
- self.player.rect.right = self.end_x
- self.check_player_x_collisions()
-
- if not self.player.dead:
- self.player.rect.y += round(self.player.y_vel)
- self.check_player_y_collisions()
-
- def check_player_x_collisions(self):
- ground_step_pipe = pg.sprite.spritecollideany(
- self.player, self.ground_step_pipe_group)
- brick = pg.sprite.spritecollideany(self.player, self.brick_group)
- box = pg.sprite.spritecollideany(self.player, self.box_group)
- enemy = pg.sprite.spritecollideany(self.player, self.enemy_group)
- shell = pg.sprite.spritecollideany(self.player, self.shell_group)
- powerup = pg.sprite.spritecollideany(self.player, self.powerup_group)
- coin = pg.sprite.spritecollideany(self.player, self.static_coin_group)
-
- if box:
- self.adjust_player_for_x_collisions(box)
- elif brick:
- self.adjust_player_for_x_collisions(brick)
- elif ground_step_pipe:
- if (ground_step_pipe.name == c.MAP_PIPE and
- ground_step_pipe.type == c.PIPE_TYPE_HORIZONTAL):
- return
- self.adjust_player_for_x_collisions(ground_step_pipe)
- elif powerup:
- if powerup.type == c.TYPE_MUSHROOM:
- self.update_score(1000, powerup, 0)
- if not self.player.big:
- self.player.y_vel = -1
- self.player.state = c.SMALL_TO_BIG
- elif powerup.type == c.TYPE_FIREFLOWER:
- self.update_score(1000, powerup, 0)
- if not self.player.big:
- self.player.state = c.SMALL_TO_BIG
- elif self.player.big and not self.player.fire:
- self.player.state = c.BIG_TO_FIRE
- elif powerup.type == c.TYPE_STAR:
- self.update_score(1000, powerup, 0)
- self.player.invincible = True
- elif powerup.type == c.TYPE_LIFEMUSHROOM:
- self.update_score(500, powerup, 0)
- self.game_info[c.LIVES] += 1
- if powerup.type != c.TYPE_FIREBALL:
- powerup.kill()
- elif enemy:
- if self.player.invincible:
- self.update_score(100, enemy, 0)
- self.move_to_dying_group(self.enemy_group, enemy)
- direction = c.RIGHT if self.player.facing_right else c.LEFT
- enemy.start_death_jump(direction)
- elif self.player.hurt_invincible:
- pass
- elif self.player.big:
- self.player.y_vel = -1
- self.player.state = c.BIG_TO_SMALL
- else:
- self.player.start_death_jump(self.game_info)
- self.death_timer = self.current_time
- elif shell:
- if shell.state == c.SHELL_SLIDE:
- if self.player.invincible:
- self.update_score(200, shell, 0)
- self.move_to_dying_group(self.shell_group, shell)
- direction = c.RIGHT if self.player.facing_right else c.LEFT
- shell.start_death_jump(direction)
- elif self.player.hurt_invincible:
- pass
- elif self.player.big:
- self.player.y_vel = -1
- self.player.state = c.BIG_TO_SMALL
- else:
- self.player.start_death_jump(self.game_info)
- self.death_timer = self.current_time
- else:
- self.update_score(400, shell, 0)
- if self.player.rect.x < shell.rect.x:
- self.player.rect.left = shell.rect.x
- shell.direction = c.RIGHT
- shell.x_vel = 10
- else:
- self.player.rect.x = shell.rect.left
- shell.direction = c.LEFT
- shell.x_vel = -10
- shell.rect.x += shell.x_vel * 4
- shell.state = c.SHELL_SLIDE
- elif coin:
- self.update_score(100, coin, 1)
- coin.kill()
-
- def adjust_player_for_x_collisions(self, collider):
- if collider.name == c.MAP_SLIDER:
- return
-
- if self.player.rect.x < collider.rect.x:
- self.player.rect.right = collider.rect.left
- else:
- self.player.rect.left = collider.rect.right
- self.player.x_vel = 0
-
- def check_player_y_collisions(self):
- ground_step_pipe = pg.sprite.spritecollideany(
- self.player, self.ground_step_pipe_group)
- enemy = pg.sprite.spritecollideany(self.player, self.enemy_group)
- shell = pg.sprite.spritecollideany(self.player, self.shell_group)
-
- # decrease runtime delay: when player is on the ground, don't check brick and box
- if self.player.rect.bottom < c.GROUND_HEIGHT:
- brick = pg.sprite.spritecollideany(self.player, self.brick_group)
- box = pg.sprite.spritecollideany(self.player, self.box_group)
- brick, box = self.prevent_collision_conflict(brick, box)
- else:
- brick, box = False, False
-
- if box:
- self.adjust_player_for_y_collisions(box)
- elif brick:
- self.adjust_player_for_y_collisions(brick)
- elif ground_step_pipe:
- self.adjust_player_for_y_collisions(ground_step_pipe)
- elif enemy:
- if self.player.invincible:
- self.update_score(100, enemy, 0)
- self.move_to_dying_group(self.enemy_group, enemy)
- direction = c.RIGHT if self.player.facing_right else c.LEFT
- enemy.start_death_jump(direction)
- elif (enemy.name == c.PIRANHA or
- enemy.name == c.FIRESTICK or
- enemy.name == c.FIRE_KOOPA or
- enemy.name == c.FIRE):
- pass
- elif self.player.y_vel > 0:
- self.update_score(100, enemy, 0)
- enemy.state = c.JUMPED_ON
- if enemy.name == c.GOOMBA:
- self.move_to_dying_group(self.enemy_group, enemy)
- elif enemy.name == c.KOOPA or enemy.name == c.FLY_KOOPA:
- self.enemy_group.remove(enemy)
- self.shell_group.add(enemy)
-
- self.player.rect.bottom = enemy.rect.top
- self.player.state = c.JUMP
- self.player.y_vel = -7
- elif shell:
- if self.player.y_vel > 0:
- if shell.state != c.SHELL_SLIDE:
- shell.state = c.SHELL_SLIDE
- if self.player.rect.centerx < shell.rect.centerx:
- shell.direction = c.RIGHT
- shell.rect.left = self.player.rect.right + 5
- else:
- shell.direction = c.LEFT
- shell.rect.right = self.player.rect.left - 5
- self.check_is_falling(self.player)
- self.check_if_player_on_IN_pipe()
-
- def prevent_collision_conflict(self, sprite1, sprite2):
- if sprite1 and sprite2:
- distance1 = abs(self.player.rect.centerx - sprite1.rect.centerx)
- distance2 = abs(self.player.rect.centerx - sprite2.rect.centerx)
- if distance1 < distance2:
- sprite2 = False
- else:
- sprite1 = False
- return sprite1, sprite2
-
- def adjust_player_for_y_collisions(self, sprite):
- if self.player.rect.top > sprite.rect.top:
- if sprite.name == c.MAP_BRICK:
- self.check_if_enemy_on_brick_box(sprite)
- if sprite.state == c.RESTING:
- if self.player.big and sprite.type == c.TYPE_NONE:
- sprite.change_to_piece(self.dying_group)
- else:
- if sprite.type == c.TYPE_COIN:
- self.update_score(200, sprite, 1)
- sprite.start_bump(self.moving_score_list)
- elif sprite.name == c.MAP_BOX:
- self.check_if_enemy_on_brick_box(sprite)
- if sprite.state == c.RESTING:
- if sprite.type == c.TYPE_COIN:
- self.update_score(200, sprite, 1)
- sprite.start_bump(self.moving_score_list)
- elif (sprite.name == c.MAP_PIPE and
- sprite.type == c.PIPE_TYPE_HORIZONTAL):
- return
-
- self.player.y_vel = 7
- self.player.rect.top = sprite.rect.bottom
- self.player.state = c.FALL
- else:
- self.player.y_vel = 0
- self.player.rect.bottom = sprite.rect.top
- if self.player.state == c.FLAGPOLE:
- self.player.state = c.WALK_AUTO
- elif self.player.state == c.END_OF_LEVEL_FALL:
- self.player.state = c.WALK_AUTO
- else:
- self.player.state = c.WALK
-
- def check_if_enemy_on_brick_box(self, brick):
- brick.rect.y -= 5
- enemy = pg.sprite.spritecollideany(brick, self.enemy_group)
- if enemy:
- self.update_score(100, enemy, 0)
- self.move_to_dying_group(self.enemy_group, enemy)
- if self.player.rect.centerx > brick.rect.centerx:
- direction = c.RIGHT
- else:
- direction = c.LEFT
- enemy.start_death_jump(direction)
- brick.rect.y += 5
-
- def in_frozen_state(self):
- if (self.player.state == c.SMALL_TO_BIG or
- self.player.state == c.BIG_TO_SMALL or
- self.player.state == c.BIG_TO_FIRE or
- self.player.state == c.DEATH_JUMP or
- self.player.state == c.DOWN_TO_PIPE or
- self.player.state == c.UP_OUT_PIPE):
- return True
- else:
- return False
-
- def check_is_falling(self, sprite):
- sprite.rect.y += 1
- check_group = pg.sprite.Group(self.ground_step_pipe_group,
- self.brick_group, self.box_group)
-
- if pg.sprite.spritecollideany(sprite, check_group) is None:
- if (sprite.state == c.WALK_AUTO or
- sprite.state == c.END_OF_LEVEL_FALL):
- sprite.state = c.END_OF_LEVEL_FALL
- elif (sprite.state != c.JUMP and
- sprite.state != c.FLAGPOLE and
- not self.in_frozen_state()):
- sprite.state = c.FALL
- sprite.rect.y -= 1
-
- def check_for_player_death(self):
- if (self.player.rect.y > c.SCREEN_HEIGHT or
- self.overhead_info.time <= 0):
- self.player.start_death_jump(self.game_info)
- self.death_timer = self.current_time
-
- def check_if_player_on_IN_pipe(self):
- '''check if player is on the pipe which can go down in to it '''
- self.player.rect.y += 1
- pipe = pg.sprite.spritecollideany(self.player, self.pipe_group)
- if pipe and pipe.type == c.PIPE_TYPE_IN:
- if (self.player.crouching and
- self.player.rect.x < pipe.rect.centerx and
- self.player.rect.right > pipe.rect.centerx):
- self.player.state = c.DOWN_TO_PIPE
- self.player.rect.y -= 1
-
- def update_game_info(self):
- if self.player.dead:
- self.persist[c.LIVES] -= 1
-
- if self.persist[c.LIVES] == 0:
- self.next = c.GAME_OVER
- elif self.overhead_info.time == 0:
- self.next = c.TIME_OUT
- elif self.player.dead:
- self.next = c.LOAD_SCREEN
- else:
- self.game_info[c.LEVEL_NUM] += 1
- self.next = c.LOAD_SCREEN
-
- def update_viewport(self):
- third = self.viewport.x + self.viewport.w//3
- player_center = self.player.rect.centerx
-
- if (self.player.x_vel > 0 and
- player_center >= third and
- self.viewport.right < self.end_x):
- self.viewport.x += round(self.player.x_vel)
- elif self.player.x_vel < 0 and self.viewport.x > self.start_x:
- self.viewport.x += round(self.player.x_vel)
-
- def move_to_dying_group(self, group, sprite):
- group.remove(sprite)
- self.dying_group.add(sprite)
-
- def update_score(self, score, sprite, coin_num=0):
- self.game_info[c.SCORE] += score
- self.game_info[c.COIN_TOTAL] += coin_num
- x = sprite.rect.x
- y = sprite.rect.y - 10
- self.moving_score_list.append(stuff.Score(x, y, score))
-
- def draw(self, surface):
- self.level.blit(self.background, self.viewport, self.viewport)
- self.powerup_group.draw(self.level)
- self.brick_group.draw(self.level)
- self.box_group.draw(self.level)
- self.coin_group.draw(self.level)
- self.dying_group.draw(self.level)
- self.brickpiece_group.draw(self.level)
- self.flagpole_group.draw(self.level)
- self.shell_group.draw(self.level)
- self.enemy_group.draw(self.level)
- self.player_group.draw(self.level)
- self.static_coin_group.draw(self.level)
- self.slider_group.draw(self.level)
- self.pipe_group.draw(self.level)
- for score in self.moving_score_list:
- score.draw(self.level)
- if c.DEBUG:
- self.ground_step_pipe_group.draw(self.level)
- self.checkpoint_group.draw(self.level)
-
- surface.blit(self.level, (0, 0), self.viewport)
- self.overhead_info.draw(surface)
diff --git a/MARIO-BROS/source/states/load_screen.py b/MARIO-BROS/source/states/load_screen.py
deleted file mode 100644
index 0f29013..0000000
--- a/MARIO-BROS/source/states/load_screen.py
+++ /dev/null
@@ -1,63 +0,0 @@
-from .. import setup, tools
-from .. import constants as c
-from ..components import info
-
-
-class LoadScreen(tools.State):
- def __init__(self):
- tools.State.__init__(self)
- self.time_list = [2400, 2600, 2635]
-
- def startup(self, current_time, persist):
- self.start_time = current_time
- self.persist = persist
- self.game_info = self.persist
- self.next = self.set_next_state()
-
- info_state = self.set_info_state()
- self.overhead_info = info.Info(self.game_info, info_state)
-
- def set_next_state(self):
- return c.LEVEL
-
- def set_info_state(self):
- return c.LOAD_SCREEN
-
- def update(self, surface, keys, current_time):
- if (current_time - self.start_time) < self.time_list[0]:
- surface.fill(c.BLACK)
- self.overhead_info.update(self.game_info)
- self.overhead_info.draw(surface)
- elif (current_time - self.start_time) < self.time_list[1]:
- surface.fill(c.BLACK)
- elif (current_time - self.start_time) < self.time_list[2]:
- surface.fill((106, 150, 252))
- else:
- self.done = True
-
-
-class GameOver(LoadScreen):
- def __init__(self):
- LoadScreen.__init__(self)
- self.time_list = [3000, 3200, 3235]
-
- def set_next_state(self):
- return c.MAIN_MENU
-
- def set_info_state(self):
- return c.GAME_OVER
-
-
-class TimeOut(LoadScreen):
- def __init__(self):
- LoadScreen.__init__(self)
- self.time_list = [2400, 2600, 2635]
-
- def set_next_state(self):
- if self.persist[c.LIVES] == 0:
- return c.GAME_OVER
- else:
- return c.LOAD_SCREEN
-
- def set_info_state(self):
- return c.TIME_OUT
diff --git a/MARIO-BROS/source/states/main_menu.py b/MARIO-BROS/source/states/main_menu.py
deleted file mode 100644
index 746c264..0000000
--- a/MARIO-BROS/source/states/main_menu.py
+++ /dev/null
@@ -1,104 +0,0 @@
-import pygame as pg
-from .. import tools
-from .. import setup
-from .. import constants as c
-from .. components import info
-
-
-class Menu(tools.State):
- def __init__(self):
- tools.State.__init__(self)
- persist = {c.COIN_TOTAL: 0,
- c.SCORE: 0,
- c.LIVES: 3,
- c.TOP_SCORE: 0,
- c.CURRENT_TIME: 0.0,
- c.LEVEL_NUM: 1,
- c.PLAYER_NAME: c.PLAYER_MARIO}
- self.startup(0.0, persist)
-
- def startup(self, current_time, persist):
- self.next = c.LOAD_SCREEN
- self.persist = persist
- self.game_info = persist
- self.overhead_info = info.Info(self.game_info, c.MAIN_MENU)
-
- self.setup_background()
- self.setup_player()
- self.setup_cursor()
-
- def setup_background(self):
- self.background = setup.GFX['level_1']
- self.background_rect = self.background.get_rect()
- self.background = pg.transform.scale(self.background,
- (int(self.background_rect.width*c.BACKGROUND_MULTIPLER),
- int(self.background_rect.height*c.BACKGROUND_MULTIPLER)))
-
- self.viewport = setup.SCREEN.get_rect(bottom=setup.SCREEN_RECT.bottom)
- self.image_dict = {}
- image = tools.get_image(setup.GFX['title_screen'], 1, 60, 176, 88,
- (255, 0, 220), c.SIZE_MULTIPLIER)
- rect = image.get_rect()
- rect.x, rect.y = (170, 100)
- self.image_dict['GAME_NAME_BOX'] = (image, rect)
-
- def setup_player(self):
- self.player_list = []
- player_rect_info = [(178, 32, 12, 16), (178, 128, 12, 16)]
- for rect in player_rect_info:
- image = tools.get_image(setup.GFX['mario_bros'],
- *rect, c.BLACK, 2.9)
- rect = image.get_rect()
- rect.x, rect.bottom = 110, c.GROUND_HEIGHT
- self.player_list.append((image, rect))
- self.player_index = 0
-
- def setup_cursor(self):
- self.cursor = pg.sprite.Sprite()
- self.cursor.image = tools.get_image(
- setup.GFX[c.ITEM_SHEET], 24, 160, 8, 8, c.BLACK, 3)
- rect = self.cursor.image.get_rect()
- rect.x, rect.y = (220, 358)
- self.cursor.rect = rect
- self.cursor.state = c.PLAYER1
-
- def update(self, surface, keys, current_time):
- self.current_time = current_time
- self.game_info[c.CURRENT_TIME] = self.current_time
- self.player_image = self.player_list[self.player_index][0]
- self.player_rect = self.player_list[self.player_index][1]
- self.update_cursor(keys)
- self.overhead_info.update(self.game_info)
-
- surface.blit(self.background, self.viewport, self.viewport)
- surface.blit(self.image_dict['GAME_NAME_BOX'][0],
- self.image_dict['GAME_NAME_BOX'][1])
- surface.blit(self.player_image, self.player_rect)
- surface.blit(self.cursor.image, self.cursor.rect)
- self.overhead_info.draw(surface)
-
- def update_cursor(self, keys):
- if self.cursor.state == c.PLAYER1:
- self.cursor.rect.y = 358
- if keys[pg.K_DOWN]:
- self.cursor.state = c.PLAYER2
- self.player_index = 1
- self.game_info[c.PLAYER_NAME] = c.PLAYER_LUIGI
- elif self.cursor.state == c.PLAYER2:
- self.cursor.rect.y = 403
- if keys[pg.K_UP]:
- self.cursor.state = c.PLAYER1
- self.player_index = 0
- self.game_info[c.PLAYER_NAME] = c.PLAYER_MARIO
- if keys[pg.K_RETURN]:
- self.reset_game_info()
- self.done = True
-
- def reset_game_info(self):
- self.game_info[c.COIN_TOTAL] = 0
- self.game_info[c.SCORE] = 0
- self.game_info[c.LIVES] = 3
- self.game_info[c.CURRENT_TIME] = 0.0
- self.game_info[c.LEVEL_NUM] = 1
-
- self.persist = self.game_info
diff --git a/MARIO-BROS/source/tools.py b/MARIO-BROS/source/tools.py
deleted file mode 100644
index 41c7e3f..0000000
--- a/MARIO-BROS/source/tools.py
+++ /dev/null
@@ -1,105 +0,0 @@
-import os
-import pygame as pg
-from abc import ABC, abstractmethod
-
-keybinding = {
- 'action': pg.K_s,
- 'jump': pg.K_a,
- 'left': pg.K_LEFT,
- 'right': pg.K_RIGHT,
- 'down': pg.K_DOWN
-}
-
-
-class State():
- def __init__(self):
- self.start_time = 0.0
- self.current_time = 0.0
- self.done = False
- self.next = None
- self.persist = {}
-
- @abstractmethod
- def startup(self, current_time, persist):
- '''abstract method'''
-
- def cleanup(self):
- self.done = False
- return self.persist
-
- @abstractmethod
- def update(sefl, surface, keys, current_time):
- '''abstract method'''
-
-
-class Control():
- def __init__(self):
- self.screen = pg.display.get_surface()
- self.done = False
- self.clock = pg.time.Clock()
- self.fps = 60
- self.current_time = 0.0
- self.keys = pg.key.get_pressed()
- self.state_dict = {}
- self.state_name = None
- self.state = None
-
- def setup_states(self, state_dict, start_state):
- self.state_dict = state_dict
- self.state_name = start_state
- self.state = self.state_dict[self.state_name]
-
- def update(self):
- self.current_time = pg.time.get_ticks()
- if self.state.done:
- self.flip_state()
- self.state.update(self.screen, self.keys, self.current_time)
-
- def flip_state(self):
- previous, self.state_name = self.state_name, self.state.next
- persist = self.state.cleanup()
- self.state = self.state_dict[self.state_name]
- self.state.startup(self.current_time, persist)
-
- def event_loop(self):
- for event in pg.event.get():
- if event.type == pg.QUIT:
- self.done = True
- elif event.type == pg.KEYDOWN:
- self.keys = pg.key.get_pressed()
- elif event.type == pg.KEYUP:
- self.keys = pg.key.get_pressed()
-
- def main(self):
- while not self.done:
- self.event_loop()
- self.update()
- pg.display.update()
- self.clock.tick(self.fps)
-
-
-def get_image(sheet, x, y, width, height, colorkey, scale):
- image = pg.Surface([width, height])
- rect = image.get_rect()
-
- image.blit(sheet, (0, 0), (x, y, width, height))
- image.set_colorkey(colorkey)
- image = pg.transform.scale(image,
- (int(rect.width*scale),
- int(rect.height*scale)))
- return image
-
-
-def load_all_gfx(directory, colorkey=(255, 0, 255), accept=('.png', '.jpg', '.bmp', '.gif')):
- graphics = {}
- for pic in os.listdir(directory):
- name, ext = os.path.splitext(pic)
- if ext.lower() in accept:
- img = pg.image.load(os.path.join(directory, pic))
- if img.get_alpha():
- img = img.convert_alpha()
- else:
- img = img.convert()
- img.set_colorkey(colorkey)
- graphics[name] = img
- return graphics
diff --git a/Math/aproximate-pi/main.py b/Math/aproximate-pi/main.py
deleted file mode 100644
index 94cc63e..0000000
--- a/Math/aproximate-pi/main.py
+++ /dev/null
@@ -1,15 +0,0 @@
-def approxPi(num):
- prev = 1
- current = 0
- i = 1
- sign = 1
- while abs(current - prev) > num:
- prev = current
- current += sign * (4/i)
- i += 2
- sign = -sign
- #print(current)
- return current
-
-print(approxPi(0.01)) # 3.1465677471829556
-print(approxPi(0.0000001)) # 3.1415927035898146
diff --git a/Math/new-point-atan2-thales/example.py b/Math/new-point-atan2-thales/example.py
deleted file mode 100644
index 4124d0f..0000000
--- a/Math/new-point-atan2-thales/example.py
+++ /dev/null
@@ -1,54 +0,0 @@
-import math
-
-'''
-Calculate new point on the same line as P1 and P2
-'''
-
-def new_coordinates_1(point_one, point_two):
-
- dx = (point_two[0] - point_one[0])
- dy = (point_two[1] - point_one[1])
-
- distance = math.sqrt(dx**2 + dy**2)
-
- angle = math.atan2(dy, dx)
-
- a = math.cos(angle) * (distance/0.5)
- b = math.sin(angle) * (distance/0.5)
-
- x_a = point_one[0] - a
- y_b = point_one[1] - b
-
- return (round(x_a), round(y_b))
-
-def new_coordinates_2(point_one, point_two):
-
- '''
- Based on "The intercept theorem", also known as "Thales' theorem"
- https://en.wikipedia.org/wiki/Intercept_theorem
- '''
-
- dx = (point_two[0] - point_one[0])
- dy = (point_two[1] - point_one[1])
-
- x_a = point_one[0] - dx/0.5
- y_b = point_one[1] - dy/0.5
-
- return (round(x_a), round(y_b))
-
-# --- test ---
-
-data = [
- ((400,400), (600,200)),
- ((400,400), (600,100)),
- ((400,400), (600,400)),
- ((400,400), (400,100)),
- ((400,400), (200,100)),
- ((400,400), (200,500)),
-]
-
-for p1, p2 in data:
- print(p1, p2)
- print("#1 New points", new_coordinates_1(p1, p2))
- print("#2 New points", new_coordinates_2(p1, p2))
- print('---')
diff --git a/Matplotlib/animation-sinus/README.md b/Matplotlib/animation-sinus/README.md
deleted file mode 100644
index da761f5..0000000
--- a/Matplotlib/animation-sinus/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/Matplotlib/animation-sinus/images/animation.gif b/Matplotlib/animation-sinus/images/animation.gif
deleted file mode 100644
index d75827c..0000000
Binary files a/Matplotlib/animation-sinus/images/animation.gif and /dev/null differ
diff --git a/Matplotlib/animation-sinus/main.py b/Matplotlib/animation-sinus/main.py
deleted file mode 100644
index e6d9b69..0000000
--- a/Matplotlib/animation-sinus/main.py
+++ /dev/null
@@ -1,41 +0,0 @@
-import numpy as np
-import matplotlib.pyplot as plt
-import matplotlib.animation as animation
-
-how_many_points = 5
-
-#fig, ax = plt.subplots()
-fig = plt.figure()
-
-# X
-line_x = np.arange(0, 2*np.pi, 0.1)
-points_x = np.arange(0, 2*np.pi, (2*np.pi-0.1)/(how_many_points-1))
-
-# Y
-line_y = np.sin(line_x)
-points_y = np.sin(points_x)
-
-# plots
-line, = plt.plot(line_x, line_y, 'red')
-points, = plt.plot(points_x, points_y, 'go') # 'g' = green, 'o' = circles
-
-# function which change data in plots
-def animate(i):
- #print(i, line_x+i)
-
- # replace Y
- line.set_ydata(np.sin(line_x+i))
- points.set_ydata(np.sin(points_x+i))
-
- return line, points
-
-# define animation matplot engine
-# interval=50 gives fps=20 (50ms*20 = 1000ms = 1second)
-ani = animation.FuncAnimation(fig, animate, line_x, interval=50)#, blit=True)
-
-# display animation - it doesn't stop - you have to close window
-plt.show()
-
-# save in file - it may need some time to save all frames
-ani.save('animation.gif', writer='imagemagick', fps=20)
-
diff --git a/Matplotlib/close-after-time-pause/main-many-images.py b/Matplotlib/close-after-time-pause/main-many-images.py
deleted file mode 100644
index 9309812..0000000
--- a/Matplotlib/close-after-time-pause/main-many-images.py
+++ /dev/null
@@ -1,13 +0,0 @@
-import matplotlib.pyplot as plt
-import numpy as np
-
-for _ in range(5):
-
- X = np.random.rand(10,10)
-
- plt.imshow(X)
-
- plt.show(block=False)
- plt.pause(3)
-
-plt.close("all")
diff --git a/Matplotlib/close-after-time-pause/main.py b/Matplotlib/close-after-time-pause/main.py
deleted file mode 100644
index 6ac89bf..0000000
--- a/Matplotlib/close-after-time-pause/main.py
+++ /dev/null
@@ -1,11 +0,0 @@
-import matplotlib.pyplot as plt
-import numpy as np
-
-X = np.random.rand(10,10)
-
-plt.imshow(X)
-
-plt.show(block=False)
-plt.pause(3)
-
-plt.close("all")
diff --git a/Matplotlib/example-3d/main-2d.py b/Matplotlib/example-3d/main-2d.py
deleted file mode 100644
index 84eb386..0000000
--- a/Matplotlib/example-3d/main-2d.py
+++ /dev/null
@@ -1,30 +0,0 @@
-
-import matplotlib.pyplot as plt
-import numpy as np
-
-def u_0(x):
- a = 1.0/np.cosh(2.0*(x+8.0))
- b = 1.0/np.cosh((x+1.0))
- return 8.0*a*a + 2.0*b*b
-
-# spatial grid
-N = 100
-x = np.linspace(-10, 10, N)
-
-# time
-Nt = 100
-tlist = np.linspace(0.0, 2.0, Nt)
-
-#velocity
-c = 5.0
-count = 0
-
-for t in tlist:
- u = u_0(x-c*t)
- u += count # offset
- plt.plot(x, u)
- count += 1
-
-plt.savefig("result_2D.png")
-plt.show()
-
diff --git a/Matplotlib/example-3d/main-3d.py b/Matplotlib/example-3d/main-3d.py
deleted file mode 100644
index 31b9fc1..0000000
--- a/Matplotlib/example-3d/main-3d.py
+++ /dev/null
@@ -1,29 +0,0 @@
-
-import matplotlib.pyplot as plt
-from mpl_toolkits.mplot3d import Axes3D # need for `projection=`
-import numpy as np
-
-def u_0(x):
- a = 1.0/np.cosh(2.0*(x+8.0))
- b = 1.0/np.cosh((x+1.0))
- return 8.0*a*a + 2.0*b*b
-
-#velocity
-c = 5.0
-
-#spatial grid
-N = 30
-x = np.linspace(-10, 10, N)
-t = np.linspace(0.0, 2.0, N)
-
-X, T = np.meshgrid(x, t)
-Y = u_0(X-c*T)
-
-fig = plt.figure()
-ax = fig.add_subplot(111, projection='3d')
-
-ax.plot_wireframe(X, T, Y)
-
-plt.savefig('result_3D.png')
-plt.show()
-
diff --git a/Matplotlib/example-3d/result_2D.png b/Matplotlib/example-3d/result_2D.png
deleted file mode 100644
index 9204934..0000000
Binary files a/Matplotlib/example-3d/result_2D.png and /dev/null differ
diff --git a/Matplotlib/example-3d/result_3D.png b/Matplotlib/example-3d/result_3D.png
deleted file mode 100644
index f01a8a8..0000000
Binary files a/Matplotlib/example-3d/result_3D.png and /dev/null differ
diff --git a/Matplotlib/multicursor-annotations/README.md b/Matplotlib/multicursor-annotations/README.md
deleted file mode 100644
index 2bbab5b..0000000
--- a/Matplotlib/multicursor-annotations/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/Matplotlib/multicursor-annotations/images/screenshot.png b/Matplotlib/multicursor-annotations/images/screenshot.png
deleted file mode 100644
index 13b8e96..0000000
Binary files a/Matplotlib/multicursor-annotations/images/screenshot.png and /dev/null differ
diff --git a/Matplotlib/multicursor-annotations/main.py b/Matplotlib/multicursor-annotations/main.py
deleted file mode 100644
index 365a3b3..0000000
--- a/Matplotlib/multicursor-annotations/main.py
+++ /dev/null
@@ -1,130 +0,0 @@
-from pylab import figure, show, np
-from matplotlib.widgets import MultiCursor
-
-class MyCursor(MultiCursor):
-
- def __init__(self, *args, **kwargs):
- super(MyCursor, self).__init__(*args, **kwargs)
-
- # create annotations
- self.annotations = []
-
- for ax in self.axes:
- annotation = self.setup_annotation(ax, (-20,20))
- self.annotations.append(annotation)
-
- def onmove(self, event):
-
- # check if mouse over any plot
- if event.inaxes:
- # get mouse position
- x, y = event.xdata, event.ydata
-
- # find nearest point on active plot
- idx = None
- for n, ax in enumerate(self.axes):
- if ax == event.inaxes: # find ative plot
- idx = self.find_nearest(ax, x, y)
- break
-
- # change annotation on all plots
- if idx is not None: # idx can be 0 so here can't be only `if idx:`
- self.change_annotations(idx)
- else:
- self.hide_annotations()
-
- # refresh plots
- self.canvas.draw()
-
- def setup_annotation(self, ax, offsets):
- annotation = ax.annotate(
- '', xy=(0, 0), ha='right', xytext=offsets,
- textcoords='offset points', va='bottom',
- bbox = dict(boxstyle='round,pad=0.5', fc='yellow', alpha=0.75),
- arrowprops = dict(arrowstyle='->', connectionstyle='arc3,rad=0')
- )
-
- return annotation
-
- def find_nearest(self, ax, x, y):
- xdata = ax.get_lines()[0].get_xdata()
- ydata = ax.get_lines()[0].get_ydata()
-
- # find nearest point and its index
- min_dist = None
- min_idx = None
-
- for idx,(px, py) in enumerate(zip(xdata, ydata)):
- # distance without sqrt()
- dist = (px-x)**2 + (py-y)**2
- if min_dist is None or dist < min_dist:
- min_dist = dist
- min_idx = idx
-
- return min_idx
-
- def change_annotations(self, idx):
- # repeat for every plot
- for ann, ax in zip(self.annotations, self.axes):
- ann.set_visible(True)
-
- # get all data for this plot
- xdata = ax.get_lines()[0].get_xdata()
- ydata = ax.get_lines()[0].get_ydata()
-
- # check if idx still in this data
- if idx < len(xdata) and idx < len(ydata):
- # get position of nearest point
- x = xdata[idx]
- y = ydata[idx]
- # set annotation position and text
- ann.xy = (x, y)
- ann.set_text("point: {}\nx,y: {:.2f}, {:.2f}".format(idx, x, y))
- else:
- ann.set_text('???')
-
- def hide_annotations(self):
- for ann in self.annotations:
- ann.set_visible(False)
-
-
-# ---------------------------------------------------------------------
-
-t = np.linspace(0.0, 1.0, 11)
-
-s1 = t
-s2 = -t
-s3 = t**2
-s4 = -(t**2)
-s5 = np.sin(t*2*np.pi)
-s6 = np.cos(t*2*np.pi)
-
-fig = figure()
-
-ax1 = fig.add_subplot(321)
-ax1.plot(t, s1)
-ax1.scatter(t, s1)
-
-ax2 = fig.add_subplot(322)
-ax2.plot(t, s2)
-ax2.scatter(t, s2)
-
-ax3 = fig.add_subplot(323)
-ax3.plot(t, s3)
-ax3.scatter(t, s3)
-
-ax4 = fig.add_subplot(324)
-ax4.plot(t, s4)
-ax4.scatter(t, s4)
-
-ax5 = fig.add_subplot(325)
-ax5.plot(t, s5)
-ax5.scatter(t, s5)
-
-ax6 = fig.add_subplot(326)
-ax6.plot(t, s6)
-ax6.scatter(t, s6)
-
-multi = MyCursor(fig.canvas, (ax1, ax2, ax3, ax4, ax5, ax6))
-
-show()
diff --git a/Matplotlib/save-without-margins/README.md b/Matplotlib/save-without-margins/README.md
deleted file mode 100644
index 462f75c..0000000
--- a/Matplotlib/save-without-margins/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-
-Result:
-
-
diff --git a/Matplotlib/save-without-margins/main.py b/Matplotlib/save-without-margins/main.py
deleted file mode 100644
index 0bc7092..0000000
--- a/Matplotlib/save-without-margins/main.py
+++ /dev/null
@@ -1,11 +0,0 @@
-
-import skimage.io as io
-import matplotlib.pyplot as plt
-
-image = io.imread("https://homepages.cae.wisc.edu/~ece533/images/lena.png")
-
-plt.imshow(image)
-plt.axis('off')
-plt.annotate("Lena", (10, 20))
-plt.savefig("output.png", bbox_inches='tight', pad_inches=0)
-
diff --git a/Matplotlib/save-without-margins/output.png b/Matplotlib/save-without-margins/output.png
deleted file mode 100644
index 68216fc..0000000
Binary files a/Matplotlib/save-without-margins/output.png and /dev/null differ
diff --git a/Matplotlib/seaborn-example/README.md b/Matplotlib/seaborn-example/README.md
deleted file mode 100644
index 7e032a3..0000000
--- a/Matplotlib/seaborn-example/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-
-Matplotlib with Seaborn
-
-
-
diff --git a/Matplotlib/seaborn-example/images/matplotlib-seaborn.png b/Matplotlib/seaborn-example/images/matplotlib-seaborn.png
deleted file mode 100644
index d27f2c2..0000000
Binary files a/Matplotlib/seaborn-example/images/matplotlib-seaborn.png and /dev/null differ
diff --git a/Matplotlib/seaborn-example/main.py b/Matplotlib/seaborn-example/main.py
deleted file mode 100644
index 1042332..0000000
--- a/Matplotlib/seaborn-example/main.py
+++ /dev/null
@@ -1,34 +0,0 @@
-import matplotlib
-matplotlib.use('TkAgg')
-
-from string import ascii_letters
-import numpy as np
-import pandas as pd
-import seaborn as sns
-import matplotlib.pyplot as plt
-
-sns.set(style="white")
-
-# Generate a large random dataset
-rs = np.random.RandomState(33)
-d = pd.DataFrame(data=rs.normal(size=(100, 26)),
- columns=list(ascii_letters[26:]))
-
-# Compute the correlation matrix
-corr = d.corr()
-
-# Generate a mask for the upper triangle
-mask = np.zeros_like(corr, dtype=np.bool)
-mask[np.triu_indices_from(mask)] = True
-
-# Set up the matplotlib figure
-f, ax = plt.subplots(figsize=(11, 9))
-
-# Generate a custom diverging colormap
-cmap = sns.diverging_palette(220, 10, as_cmap=True)
-
-# Draw the heatmap with the mask and correct aspect ratio
-sns.heatmap(corr, mask=mask, cmap=cmap, vmax=.3, center=0,
- square=True, linewidths=.5, cbar_kws={"shrink": .5})
-
-plt.show()
diff --git a/Password_generator.py b/Password_generator.py
deleted file mode 100644
index 298f593..0000000
--- a/Password_generator.py
+++ /dev/null
@@ -1,95 +0,0 @@
-import string as str
-import secrets
-import random # this is the module used to generate random numbers on your given range
-
-
-class PasswordGenerator:
- @staticmethod
- def gen_sequence(
- conditions,
- ): # must have conditions (in a list format), for each member of the list possible_characters
- possible_characters = [
- str.ascii_lowercase,
- str.ascii_uppercase,
- str.digits,
- str.punctuation,
- ]
- sequence = ""
- for x in range(len(conditions)):
- if conditions[x]:
- sequence += possible_characters[x]
- else:
- pass
- return sequence
-
- @staticmethod
- def gen_password(sequence, passlength=8):
- password = "".join((secrets.choice(sequence) for i in range(passlength)))
- return password
-
-
-class Interface:
- has_characters = {
- "lowercase": True,
- "uppercase": True,
- "digits": True,
- "punctuation": True,
- }
-
- @classmethod
- def change_has_characters(cls, change):
- try:
- cls.has_characters[
- change
- ] # to check if the specified key exists in the dicitonary
- except Exception as err:
- print(f"Invalid \nan Exception: {err}")
- else:
- cls.has_characters[change] = not cls.has_characters[
- change
- ] # automaticly changres to the oppesite value already there
- print(f"{change} is now set to {cls.has_characters[change]}")
-
- @classmethod
- def show_has_characters(cls):
- print(cls.has_characters) # print the output
-
- def generate_password(self, lenght):
- sequence = PasswordGenerator.gen_sequence(list(self.has_characters.values()))
- print(PasswordGenerator.gen_password(sequence, lenght))
-
-
-def list_to_vertical_string(list):
- to_return = ""
- for member in list:
- to_return += f"{member}\n"
- return to_return
-
-
-class Run:
- def decide_operation(self):
- user_input = input(": ")
- try:
- int(user_input)
- except:
- Interface.change_has_characters(user_input)
- else:
- Interface().generate_password(int(user_input))
- finally:
- print("\n\n")
-
- def run(self):
- menu = f"""Welcome to the PassGen App!
-Commands:
- generate password ->
-
-
-commands to change the characters to be used to generate passwords:
-{list_to_vertical_string(Interface.has_characters.keys())}
- """
- print(menu)
- while True:
- self.decide_operation()
-
-
-Run().run()
diff --git a/Passwords/key.key b/Passwords/key.key
deleted file mode 100644
index bdcb3f5..0000000
--- a/Passwords/key.key
+++ /dev/null
@@ -1 +0,0 @@
-Raq7IMZ4QkqK2Oj7lKT3bxJTgwxeJFYx4ADjTqVKdQY=
\ No newline at end of file
diff --git a/Passwords/password_manager.py b/Passwords/password_manager.py
deleted file mode 100644
index 140c74a..0000000
--- a/Passwords/password_manager.py
+++ /dev/null
@@ -1,50 +0,0 @@
-from cryptography.fernet import Fernet
-
-'''
-def write_key():
- key = Fernet.generate_key()
- with open("key.key", "wb") as key_file:
- key_file.write(key)'''
-
-
-def load_key():
- file = open("key.key", "rb")
- key = file.read()
- file.close()
- return key
-
-
-key = load_key()
-fer = Fernet(key)
-
-
-def view():
- with open('passwords.txt', 'r') as f:
- for line in f.readlines():
- data = line.rstrip()
- user, passw = data.split("|")
- print("User:", user, "| Password:",
- fer.decrypt(passw.encode()).decode())
-
-
-def add():
- name = input('Account Name: ')
- pwd = input("Password: ")
-
- with open('passwords.txt', 'a') as f:
- f.write(name + "|" + fer.encrypt(pwd.encode()).decode() + "\n")
-
-
-while True:
- mode = input(
- "Would you like to add a new password or view existing ones (view, add), press q to quit? ").lower()
- if mode == "q":
- break
-
- if mode == "view":
- view()
- elif mode == "add":
- add()
- else:
- print("Invalid mode.")
- continue
diff --git a/Passwords/passwords.txt b/Passwords/passwords.txt
deleted file mode 100644
index 3478abd..0000000
--- a/Passwords/passwords.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-joe|gAAAAABgjFWyJO-TuQzczus2VTKZEkiQm40dWlU49uG4s0KztOLsTMCXUDN7DSSytU7w9ArgVZzhvt3oivFfFty1DwO0yZ71Fw==
-billy|gAAAAABgjFYUZ22T15aXZyx72CpbC0Rd6hRcxq82RiAMn5Pj2WoMyzy8zAInqvwhg04LNWsW7lnlx3_RHpEEQ9fzhIYG9F0-lA==
diff --git a/Post-Files/main.py b/Post-Files/main.py
deleted file mode 100644
index 9b783a5..0000000
--- a/Post-Files/main.py
+++ /dev/null
@@ -1,58 +0,0 @@
-from bottle import route, run, request, redirect
-from threading import Thread
-import os
-
-
-class File(Thread):
- def __init__(self, files):
- Thread.__init__(self)
- self.files = files
-
- def run(self):
- print('[thread] files:', self.files)
- for file in self.files:
- file.save("./save_file", overwrite=True)
- print("./save_file/" + file.filename)
-
-
-@route('/')
-def index():
- """
-
-'''
-
-@route('/upload', method='POST')
-def file():
- print('[bottle] url: /upload')
-
-
- print('[bottle] query:', request.query.keys())
- print('[bottle] forms:', request.forms.keys())
- print('[bottle] files:', request.files.keys())
-
- files = request.files.getall('file')
- print('[bottle] files:', files)
-
- save_path = "./save_file"
- if not os.path.exists(save_path):
- os.mkdir(save_path)
-
- File(files).start()
-
- print('[bottle] redirect: /')
- redirect('/')
- # print('after redirect') # never executed
-
-if __name__ == '__main__':
- run()
diff --git a/Post-Files/save_file/notatki-2019.06.25.txt b/Post-Files/save_file/notatki-2019.06.25.txt
deleted file mode 100644
index 165c666..0000000
--- a/Post-Files/save_file/notatki-2019.06.25.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-Bit,99buket,+123
-
-import itertools
-import pandas as pd
-
-it = itertools.product(('A', 'B'), ('X', 'Y'))
-
-df = pd.DataFrame(it)
-df
diff --git a/Post-Files/save_file/pcloud-menu.png b/Post-Files/save_file/pcloud-menu.png
deleted file mode 100644
index b8e4dc5..0000000
Binary files a/Post-Files/save_file/pcloud-menu.png and /dev/null differ
diff --git a/Snake.py b/Snake.py
deleted file mode 100644
index c20da35..0000000
--- a/Snake.py
+++ /dev/null
@@ -1,191 +0,0 @@
-import math
-import random
-import pygame
-import random
-import tkinter as tk
-from tkinter import messagebox
-
-width = 500
-height = 500
-
-cols = 25
-rows = 20
-
-
-class cube():
- rows = 20
- w = 500
-
- def __init__(self, start, dirnx=1, dirny=0, color=(255, 0, 0)):
- self.pos = start
- self.dirnx = dirnx
- self.dirny = dirny # "L", "R", "U", "D"
- self.color = color
-
- def move(self, dirnx, dirny):
- self.dirnx = dirnx
- self.dirny = dirny
- self.pos = (self.pos[0] + self.dirnx, self.pos[1] + self.dirny)
-
- def draw(self, surface, eyes=False):
- dis = self.w // self.rows
- i = self.pos[0]
- j = self.pos[1]
-
- pygame.draw.rect(surface, self.color, (i*dis+1, j*dis+1, dis-2, dis-2))
- if eyes:
- centre = dis//2
- radius = 3
- circleMiddle = (i*dis+centre-radius, j*dis+8)
- circleMiddle2 = (i*dis + dis - radius*2, j*dis+8)
- pygame.draw.circle(surface, (0, 0, 0), circleMiddle, radius)
- pygame.draw.circle(surface, (0, 0, 0), circleMiddle2, radius)
-
-
-class snake():
- body = []
- turns = {}
-
- def __init__(self, color, pos):
- # pos is given as coordinates on the grid ex (1,5)
- self.color = color
- self.head = cube(pos)
- self.body.append(self.head)
- self.dirnx = 0
- self.dirny = 1
-
- def move(self):
- for event in pygame.event.get():
- if event.type == pygame.QUIT:
- pygame.quit()
- keys = pygame.key.get_pressed()
-
- for key in keys:
- if keys[pygame.K_LEFT]:
- self.dirnx = -1
- self.dirny = 0
- self.turns[self.head.pos[:]] = [self.dirnx, self.dirny]
- elif keys[pygame.K_RIGHT]:
- self.dirnx = 1
- self.dirny = 0
- self.turns[self.head.pos[:]] = [self.dirnx, self.dirny]
- elif keys[pygame.K_UP]:
- self.dirny = -1
- self.dirnx = 0
- self.turns[self.head.pos[:]] = [self.dirnx, self.dirny]
- elif keys[pygame.K_DOWN]:
- self.dirny = 1
- self.dirnx = 0
- self.turns[self.head.pos[:]] = [self.dirnx, self.dirny]
-
- for i, c in enumerate(self.body):
- p = c.pos[:]
- if p in self.turns:
- turn = self.turns[p]
- c.move(turn[0], turn[1])
- if i == len(self.body)-1:
- self.turns.pop(p)
- else:
- c.move(c.dirnx, c.dirny)
-
- def reset(self, pos):
- self.head = cube(pos)
- self.body = []
- self.body.append(self.head)
- self.turns = {}
- self.dirnx = 0
- self.dirny = 1
-
- def addCube(self):
- tail = self.body[-1]
- dx, dy = tail.dirnx, tail.dirny
-
- if dx == 1 and dy == 0:
- self.body.append(cube((tail.pos[0]-1, tail.pos[1])))
- elif dx == -1 and dy == 0:
- self.body.append(cube((tail.pos[0]+1, tail.pos[1])))
- elif dx == 0 and dy == 1:
- self.body.append(cube((tail.pos[0], tail.pos[1]-1)))
- elif dx == 0 and dy == -1:
- self.body.append(cube((tail.pos[0], tail.pos[1]+1)))
-
- self.body[-1].dirnx = dx
- self.body[-1].dirny = dy
-
- def draw(self, surface):
- for i, c in enumerate(self.body):
- if i == 0:
- c.draw(surface, True)
- else:
- c.draw(surface)
-
-
-def redrawWindow():
- global win
- win.fill((0, 0, 0))
- drawGrid(width, rows, win)
- s.draw(win)
- snack.draw(win)
- pygame.display.update()
- pass
-
-
-def drawGrid(w, rows, surface):
- sizeBtwn = w // rows
-
- x = 0
- y = 0
- for l in range(rows):
- x = x + sizeBtwn
- y = y + sizeBtwn
-
- pygame.draw.line(surface, (255, 255, 255), (x, 0), (x, w))
- pygame.draw.line(surface, (255, 255, 255), (0, y), (w, y))
-
-
-def randomSnack(rows, item):
- positions = item.body
-
- while True:
- x = random.randrange(1, rows-1)
- y = random.randrange(1, rows-1)
- if len(list(filter(lambda z: z.pos == (x, y), positions))) > 0:
- continue
- else:
- break
-
- return (x, y)
-
-
-def main():
- global s, snack, win
- win = pygame.display.set_mode((width, height))
- s = snake((255, 0, 0), (10, 10))
- s.addCube()
- snack = cube(randomSnack(rows, s), color=(0, 255, 0))
- flag = True
- clock = pygame.time.Clock()
-
- while flag:
- pygame.time.delay(50)
- clock.tick(10)
- s.move()
- headPos = s.head.pos
- if headPos[0] >= 20 or headPos[0] < 0 or headPos[1] >= 20 or headPos[1] < 0:
- print("Score:", len(s.body))
- s.reset((10, 10))
-
- if s.body[0].pos == snack.pos:
- s.addCube()
- snack = cube(randomSnack(rows, s), color=(0, 255, 0))
-
- for x in range(len(s.body)):
- if s.body[x].pos in list(map(lambda z: z.pos, s.body[x+1:])):
- print("Score:", len(s.body))
- s.reset((10, 10))
- break
-
- redrawWindow()
-
-
-main()
diff --git a/Snake_water_gun.py b/Snake_water_gun.py
deleted file mode 100644
index c7b90db..0000000
--- a/Snake_water_gun.py
+++ /dev/null
@@ -1,79 +0,0 @@
-# This is an editied version
-# Made the code much more easier to read
-# Used better naming for variable
-# There were few inconsistencies in the outputs of the first if/else/if ladder \
-# inside the while loop. That is solved.
-import random
-import time
-from os import system
-
-class bcolors:
- HEADERS = '\033[95m'
- OKBLUE = '\033[94m'
- OKGREEN = '\033[93m'
- WARNING = '\033[92m'
- FAIL = '\033[91m'
- ENDC = '\033[0m'
- BOLD = '\033[1m'
- UNDERLINE = '\033[4m'
-
-run = True
-li = ["s", "w", "g"]
-
-system("clear")
-b = input(bcolors.OKBLUE + bcolors.BOLD + "Welcome to the game 'Snake-Water-Gun'.\nWanna play? Type Y or N: " + bcolors.ENDC).capitalize()
-
-if b == "N" :
- run = False
- print("Ok bubyeee! See you later")
-elif b=="Y" or b=="y":
- print("There will be 10 matches and the one who won max matches will win Let's start")
-
-i = 0
-score = 0
-
-while run and i<10:
-
- comp_choice = random.choice(li)
- user_choice = input("Type s for snake,w for water or g for gun: ").lower()
-
- if user_choice == comp_choice:
- print(bcolors.HEADERS + "Game draws.Play again" + bcolors.ENDC)
-
- elif user_choice == "s" and comp_choice == "g":
- print(bcolors.FAIL +"It's Snake v/s Gun You lose!" + bcolors.ENDC)
-
- elif user_choice == "s" and comp_choice == "w":
- print(bcolors.OKGREEN + "It's Snake v/s Water. You won" + bcolors.ENDC)
- score += 1
-
- elif user_choice == "w" and comp_choice == "s":
- print(bcolors.FAIL +"It's Water v/s Snake You lose!" + bcolors.ENDC)
-
- elif user_choice == "w" and comp_choice == "g":
- print(bcolors.OKGREEN + "It's Water v/s Gun. You won" + bcolors.ENDC)
- score +=1
-
- elif user_choice == "g" and comp_choice == "w":
- print(bcolors.FAIL +"It's Gun v/s Water You lose!" + bcolors.ENDC)
-
- elif user_choice == "g" and comp_choice == "s":
- print(bcolors.OKGREEN + "It's Gun v/s Snake. You won" + bcolors.ENDC)
- score += 1
-
- else:
- print("Wrong input")
- continue
-
- i += 1
- print(f"{10-i} matches left")
-
-if run == True:
- print(f"Your score is {score} and the final result is...")
- time.sleep(3)
- if score > 5:
- print(bcolors.OKGREEN + bcolors.BOLD + "Woooh!!!!!!! Congratulations you won" + bcolors.ENDC)
- elif score == 5:
- print("Game draws!!!!!!!")
- elif score < 5:
- print(bcolors.FAIL + bcolors.BOLD + "You lose!!!.Better luck next time" + bcolors.ENDC)
diff --git a/Tetris.py b/Tetris.py
deleted file mode 100644
index a5e895d..0000000
--- a/Tetris.py
+++ /dev/null
@@ -1,405 +0,0 @@
-import pygame
-import random
-
-"""
-10 x 20 square grid
-shapes: S, Z, I, O, J, L, T
-represented in order by 0 - 6
-"""
-
-pygame.font.init()
-
-# GLOBALS VARS
-s_width = 800
-s_height = 700
-play_width = 300 # meaning 300 // 10 = 30 width per block
-play_height = 600 # meaning 600 // 20 = 20 height per block
-block_size = 30
-
-top_left_x = (s_width - play_width) // 2
-top_left_y = s_height - play_height
-
-
-# SHAPE FORMATS
-
-S = [['.....',
- '.....',
- '..00.',
- '.00..',
- '.....'],
- ['.....',
- '..0..',
- '..00.',
- '...0.',
- '.....']]
-
-Z = [['.....',
- '.....',
- '.00..',
- '..00.',
- '.....'],
- ['.....',
- '..0..',
- '.00..',
- '.0...',
- '.....']]
-
-I = [['..0..',
- '..0..',
- '..0..',
- '..0..',
- '.....'],
- ['.....',
- '0000.',
- '.....',
- '.....',
- '.....']]
-
-O = [['.....',
- '.....',
- '.00..',
- '.00..',
- '.....']]
-
-J = [['.....',
- '.0...',
- '.000.',
- '.....',
- '.....'],
- ['.....',
- '..00.',
- '..0..',
- '..0..',
- '.....'],
- ['.....',
- '.....',
- '.000.',
- '...0.',
- '.....'],
- ['.....',
- '..0..',
- '..0..',
- '.00..',
- '.....']]
-
-L = [['.....',
- '...0.',
- '.000.',
- '.....',
- '.....'],
- ['.....',
- '..0..',
- '..0..',
- '..00.',
- '.....'],
- ['.....',
- '.....',
- '.000.',
- '.0...',
- '.....'],
- ['.....',
- '.00..',
- '..0..',
- '..0..',
- '.....']]
-
-T = [['.....',
- '..0..',
- '.000.',
- '.....',
- '.....'],
- ['.....',
- '..0..',
- '..00.',
- '..0..',
- '.....'],
- ['.....',
- '.....',
- '.000.',
- '..0..',
- '.....'],
- ['.....',
- '..0..',
- '.00..',
- '..0..',
- '.....']]
-
-shapes = [S, Z, I, O, J, L, T]
-shape_colors = [(0, 255, 0), (255, 0, 0), (0, 255, 255),
- (255, 255, 0), (255, 165, 0), (0, 0, 255), (128, 0, 128)]
-# index 0 - 6 represent shape
-
-
-class Piece(object):
- rows = 20 # y
- columns = 10 # x
-
- def __init__(self, column, row, shape):
- self.x = column
- self.y = row
- self.shape = shape
- self.color = shape_colors[shapes.index(shape)]
- self.rotation = 0 # number from 0-3
-
-
-def create_grid(locked_positions={}):
- grid = [[(0, 0, 0) for x in range(10)] for x in range(20)]
-
- for i in range(len(grid)):
- for j in range(len(grid[i])):
- if (j, i) in locked_positions:
- c = locked_positions[(j, i)]
- grid[i][j] = c
- return grid
-
-
-def convert_shape_format(shape):
- positions = []
- format = shape.shape[shape.rotation % len(shape.shape)]
-
- for i, line in enumerate(format):
- row = list(line)
- for j, column in enumerate(row):
- if column == '0':
- positions.append((shape.x + j, shape.y + i))
-
- for i, pos in enumerate(positions):
- positions[i] = (pos[0] - 2, pos[1] - 4)
-
- return positions
-
-
-def valid_space(shape, grid):
- accepted_positions = [[(j, i) for j in range(
- 10) if grid[i][j] == (0, 0, 0)] for i in range(20)]
- accepted_positions = [j for sub in accepted_positions for j in sub]
- formatted = convert_shape_format(shape)
-
- for pos in formatted:
- if pos not in accepted_positions:
- if pos[1] > -1:
- return False
-
- return True
-
-
-def check_lost(positions):
- for pos in positions:
- x, y = pos
- if y < 1:
- return True
- return False
-
-
-def get_shape():
- global shapes, shape_colors
-
- return Piece(5, 0, random.choice(shapes))
-
-
-def draw_text_middle(text, size, color, surface):
- font = pygame.font.SysFont('comicsans', size, bold=True)
- label = font.render(text, 1, color)
-
- surface.blit(label, (top_left_x + play_width/2 - (label.get_width() / 2),
- top_left_y + play_height/2 - label.get_height()/2))
-
-
-def draw_grid(surface, row, col):
- sx = top_left_x
- sy = top_left_y
- for i in range(row):
- pygame.draw.line(surface, (128, 128, 128), (sx, sy + i*30),
- (sx + play_width, sy + i * 30)) # horizontal lines
- for j in range(col):
- pygame.draw.line(surface, (128, 128, 128), (sx + j * 30, sy),
- (sx + j * 30, sy + play_height)) # vertical lines
-
-
-def clear_rows(grid, locked):
- # need to see if row is clear the shift every other row above down one
-
- inc = 0
- for i in range(len(grid)-1, -1, -1):
- row = grid[i]
- if (0, 0, 0) not in row:
- inc += 1
- # add positions to remove from locked
- ind = i
- for j in range(len(row)):
- try:
- del locked[(j, i)]
- except:
- continue
- if inc > 0:
- for key in sorted(list(locked), key=lambda x: x[1])[::-1]:
- x, y = key
- if y < ind:
- newKey = (x, y + inc)
- locked[newKey] = locked.pop(key)
-
-
-def draw_next_shape(shape, surface):
- font = pygame.font.SysFont('comicsans', 30)
- label = font.render('Next Shape', 1, (255, 255, 255))
-
- sx = top_left_x + play_width + 50
- sy = top_left_y + play_height/2 - 100
- format = shape.shape[shape.rotation % len(shape.shape)]
-
- for i, line in enumerate(format):
- row = list(line)
- for j, column in enumerate(row):
- if column == '0':
- pygame.draw.rect(surface, shape.color,
- (sx + j*30, sy + i*30, 30, 30), 0)
-
- surface.blit(label, (sx + 10, sy - 30))
-
-
-def draw_window(surface):
- surface.fill((0, 0, 0))
- # Tetris Title
- font = pygame.font.SysFont('comicsans', 60)
- label = font.render('TETRIS', 1, (255, 255, 255))
-
- surface.blit(label, (top_left_x + play_width /
- 2 - (label.get_width() / 2), 30))
-
- for i in range(len(grid)):
- for j in range(len(grid[i])):
- pygame.draw.rect(
- surface, grid[i][j], (top_left_x + j * 30, top_left_y + i * 30, 30, 30), 0)
-
- # draw grid and border
- draw_grid(surface, 20, 10)
- pygame.draw.rect(surface, (255, 0, 0), (top_left_x,
- top_left_y, play_width, play_height), 5)
- # pygame.display.update()
-
-
-def main():
- global grid
-
- locked_positions = {} # (x,y):(255,0,0)
- grid = create_grid(locked_positions)
-
- change_piece = False
- run = True
- current_piece = get_shape()
- next_piece = get_shape()
- clock = pygame.time.Clock()
- fall_time = 0
- level_time = 0
- fall_speed = 0.55
- score = 0
-
- while run:
-
- grid = create_grid(locked_positions)
- fall_time += clock.get_rawtime()
- level_time += clock.get_rawtime()
- clock.tick()
-
- if level_time/1000 > 4:
- level_time = 0
- if fall_speed > 0.40:
- fall_speed -= 0.005
-
- # PIECE FALLING CODE
- if fall_time/1000 >= fall_speed:
- fall_time = 0
- current_piece.y += 1
- if not (valid_space(current_piece, grid)) and current_piece.y > 0:
- current_piece.y -= 1
- change_piece = True
-
- for event in pygame.event.get():
- if event.type == pygame.QUIT:
- run = False
- pygame.display.quit()
- quit()
-
- if event.type == pygame.KEYDOWN:
- if event.key == pygame.K_LEFT:
- current_piece.x -= 1
- if not valid_space(current_piece, grid):
- current_piece.x += 1
-
- elif event.key == pygame.K_RIGHT:
- current_piece.x += 1
- if not valid_space(current_piece, grid):
- current_piece.x -= 1
- elif event.key == pygame.K_UP:
- # rotate shape
- current_piece.rotation = current_piece.rotation + \
- 1 % len(current_piece.shape)
- if not valid_space(current_piece, grid):
- current_piece.rotation = current_piece.rotation - \
- 1 % len(current_piece.shape)
-
- if event.key == pygame.K_DOWN:
- # move shape down
- current_piece.y += 1
- if not valid_space(current_piece, grid):
- current_piece.y -= 1
-
- '''if event.key == pygame.K_SPACE:
- while valid_space(current_piece, grid):
- current_piece.y += 1
- current_piece.y -= 1
- print(convert_shape_format(current_piece))'''
-
- shape_pos = convert_shape_format(current_piece)
-
- # add piece to the grid for drawing
- for i in range(len(shape_pos)):
- x, y = shape_pos[i]
- if y > -1:
- grid[y][x] = current_piece.color
-
- # IF PIECE HIT GROUND
- if change_piece:
- for pos in shape_pos:
- p = (pos[0], pos[1])
- locked_positions[p] = current_piece.color
- current_piece = next_piece
- next_piece = get_shape()
- change_piece = False
-
- # call four times to check for multiple clear rows
- if clear_rows(grid, locked_positions):
- score += 10
-
- draw_window(win)
- draw_next_shape(next_piece, win)
- pygame.display.update()
-
- # Check if user lost
- if check_lost(locked_positions):
- run = False
-
- draw_text_middle("You Lost", 40, (255, 255, 255), win)
- pygame.display.update()
- pygame.time.delay(2000)
-
-
-def main_menu():
- run = True
- while run:
- win.fill((0, 0, 0))
- draw_text_middle('Press any key to begin.', 60, (255, 255, 255), win)
- pygame.display.update()
- for event in pygame.event.get():
- if event.type == pygame.QUIT:
- run = False
-
- if event.type == pygame.KEYDOWN:
- main()
- pygame.quit()
-
-
-win = pygame.display.set_mode((s_width, s_height))
-pygame.display.set_caption('Tetris')
-
-main_menu() # start game
diff --git a/Turtle.py b/Turtle.py
deleted file mode 100644
index ffacc7f..0000000
--- a/Turtle.py
+++ /dev/null
@@ -1,291 +0,0 @@
-import math
-import random
-import turtle
-
-# Define several useful constants to be used by the Turtle graphics.
-WIDTH = 960 # Usually 720, 960, 1024, 1280, 1600, or 1920.
-HEIGHT = WIDTH * 9 // 16 # Produces the eye-pleasing 16:9 HD aspect ratio.
-MARGIN = WIDTH // 30 # Somewhat arbitrary value, but it looks nice.
-FONT_SIZE = MARGIN // 2 # Somewhat arbitrary value, but it looks nice.
-DRAW_FAST = False # Set to True for fast, non-animated turtle movement.
-
-COLORS = [ "red", "green", "blue", "yellow", "cyan", "magenta", "white", "black" ]
-
-
-def main():
- """Main program to test solutions for each exercise."""
- # Print the docstring at the top of the file so your instructor can see your name.
- print( __doc__ )
-
- # Call each individual exercise; comment/un-comment these lines as you work.
- # exercise0()
- # exercise1()
- exercise2()
-
-
-class Point:
- """Point class for representing (x,y) coordinates."""
-
- # TODO 0a: Read, discuss, and understand the following code.
- def __init__( self, x=0, y=0 ):
- """Create a new Point with the given x and y values.
- :param int x: The x-coordinate; default is zero.
- :param int y: The y-coordinate; default is zero.
- """
- # Assign the x and y values passed as parameters as attributes of self.
- self.x = x
- self.y = y
-
- # TODO 0c: Read, discuss, and understand the following code.
- def draw( self, art ):
- """Draw this Point object using the given turtle.
- :param turtle.Turtle art: The turtle to use to draw this Point object.
- :return: None
- """
- # Use the self object's x and y values to set the heading.
- art.setheading( art.towards( self.x, self.y ) )
- # Use the self object's x and y values to move the turtle.
- art.setposition( self.x, self.y )
- # Draw a dot at the point.
- art.dot( 4 )
-
-
-def exercise0():
- """Demonstrate a Point class."""
- # Create the turtle screen and two turtles (leave this as the first line).
- screen, artist, writer = turtle_setup()
- writer.write( "Creating and drawing Point objects...",
- align="center", font=( "Times", FONT_SIZE, "bold" ) )
-
- # TODO 0b: Read, discuss, and understand the following code.
- points = [] # An empty list to be filled with Point objects.
- y = HEIGHT // 4 # Start the y-coordinate one-quarter screen height above the x-axis.
- # Loop through evenly spaced x-coordinates.
- for x in range( -WIDTH // 2 + MARGIN, WIDTH // 2 + MARGIN, ( WIDTH - MARGIN * 2 ) // 8 ):
- p = Point( x, y ) # Use the values of x and y to create a Point object.
- points.append( p ) # Appends the point to the list of point objects.
- y *= -1 # Modify y so the points alternate above and below the x-axis.
-
- # TODO 0d: Read, discuss, and understand the following code.
- # Loop through the list of Point objects and tell each to draw itself.
- for p in points:
- print( p, flush=True )
- # Tell the Point object to draw itself using the artist turtle.
- p.draw( artist )
-
- # Wait for the user to click before closing the window (leave this as the last line).
- artist.home()
- screen.exitonclick()
-
-
-# TODO 1a: In the space below this comment, write the class as described in the lab document.
-class Spot:
- """Spot class for representing (x,y) coordinates."""
-
- def __init__( self, x=0, y=0, color=""):
- """Create a new Spot with the given x and y values.
- :param int x: The x-coordinate; default is zero.
- :param int y: The y-coordinate; default is zero.
- :param string color: The color of the spot
- """
- # Assign the x and y values passed as parameters as attributes of self.
- self.x = x
- self.y = y
- self.color = color
-
- def __str__( self ):
- """Return a string representation of this object.
- :return: The Point object in the format (x,y).
- :rtype: str
- """
- return "({},{})".format( self.x, self.y )
-
- # TODO 0c: Read, discuss, and understand the following code.
- def draw( self, art ):
- """Draw this Point object using the given turtle.
- :param turtle.Turtle art: The turtle to use to draw this Point object.
- :return: None
- """
- # Use the self object's x and y values to set the heading.
- art.setheading( art.towards( self.x, self.y ) )
- # Use the self object's x and y values to move the turtle.
- art.setposition( self.x, self.y )
- # Draw a dot at the point.
- art.dot( 20, self.color )
- art.setposition( self.x + 10, self.y - 10 )
- art.dot( 15, self.color )
- art.setposition( self.x - 10, self.y - 10 )
- art.dot( 15, self.color )
- art.setposition( self.x, self.y - 15 )
- art.dot( 20, self.color )
-
-
-def exercise1():
- """Test a Spot class."""
- # Create the turtle screen and two turtles (leave this as the first line).
- screen, artist, writer = turtle_setup()
- writer.write( "Creating and drawing Spot objects...",
- align="center", font=( "Times", FONT_SIZE, "bold" ) )
-
- # TODO 1b: In the space below, use the class as described in the lab document.
- spots = []
- x = (-WIDTH / 2) + MARGIN
- y = (-HEIGHT / 2) + MARGIN
- x_shift = (WIDTH - (2 * MARGIN)) / 7
- y_shift = (HEIGHT - (2 * MARGIN)) / 7
-
- for i in range(8):
- s = Spot( x, y, COLORS[i] )
- s.draw(artist)
- x += x_shift
- y += y_shift
-
-
- # Wait for the user to click before closing the window (leave this as the last line).
- artist.home()
- screen.exitonclick()
-
-
-# TODO 2a: In the space below this comment, write the class as described in the lab document.
-class Raindrop:
- """Raindrop class for representing (x,y) coordinates."""
-
- def __init__( self ):
- """Create a new Raindrop with the given x and y values.
- :int x: The x-coordinate; default is zero.
- :int y: The y-coordinate; default is zero.
- :int radius: The radius of the raindrop
- """
-
- # Assign the x and y values passed as parameters as attributes of self.
- self.x = random.randint( -WIDTH // 2 + MARGIN, WIDTH // 2 - MARGIN )
- self.y = random.randint( -HEIGHT // 2 + MARGIN, HEIGHT // 2 - MARGIN )
- self.radius = random.randint( 25, 25 )
-
- def __str__( self ):
- """Return a string representation of this object.
- :return: The Point object in the format (x,y).
- :rtype: str
- """
- return "({},{}):{:.2f}".format( self.x, self.y, self.radius)
-
- def draw( self, art ):
- """Draw this Point object using the given turtle.
- :param turtle.Turtle art: The turtle to use to draw this Point object.
- :return: None
- """
- # Use the self object's x and y values to set the heading.
- art.setheading( art.towards( self.x, self.y ) )
- # Use the self object's x and y values to move the turtle.
- art.setposition( self.x, self.y )
- # Draw a dot at the point.
- art.dot( self.radius*2 )
-
- def area( self ):
- return math.pow( self.radius, 2 ) * math.pi
-
- def overlaps( self, other ):
- if math.hypot(self.x - other.x, self.y - other.y) <= (self.radius + other.radius):
- return True
- else:
- return False
-
- def expand( self, other, art ):
- total = self.area() + other.area()
- self.radius = math.sqrt(total // math.pi)
-
-
-def exercise2():
- """Test a Raindrop class."""
- # Create the turtle screen and two turtles (leave this as the first line).
- screen, artist, writer = turtle_setup()
- writer.write( "Creating and drawing Raindrop objects...",
- align="center", font=( "Times", FONT_SIZE, "bold" ) )
-
- # Make the artist turtle a blue circle for this application.
- # artist.color( 'blue' )
- # artist.shape( "circle" )
-
- # TODO 2b: In the space below, use the class as described in the lab document.
- raindrops = [] # An empty list to be filled with Point objects.
- stop = False
- while not stop:
- total_area = 0
- r = Raindrop() # Calls the Point object's __init__ method to create a point object.
-
- # Have the writer turtle display the Point object's x and y values.
- writer.clear()
- writer.write( "Moving to point ({}, {})...".format( r.x, r.y ),
- align="center", font=( "Times", FONT_SIZE, "bold" ) )
-
- print("Drawing new drop {}".format( r, flush=True ))
- r.draw( artist )
-
- for drop in raindrops:
- if r.overlaps(drop):
- r.expand( drop, artist )
- r.draw( artist )
- print("Expanding drop {}".format( r, flush=True))
- total_area += r.area()
-
- raindrops.append( r ) # Appends the point to the list of point objects.
-
- if total_area > (HEIGHT * WIDTH):
- stop = True
-
- # Wait for the user to click before closing the window (leave this as the last line).
- artist.home()
- screen.exitonclick()
-
-
-def turtle_setup():
- """Setup the turtle environment with a screen and two turtles, one for drawing and one for writing.
- Using separate turtles for drawing and writing makes it easy to clear one or the other by
- doing artist.clear() or writer.clear() to clear only the drawing or writing, respectively.
- :return: The screen, a drawing turtle, and a writing turtle.
- :rtype: (turtle.Screen, turtle.Turtle, turtle.Turtle)
- """
- # ___ ___ _ _ ___ _____ __ __ ___ ___ ___ _____ __
- # | \ / _ \ | \| |/ _ \_ _| | \/ |/ _ \| \_ _| __\ \ / /
- # | |) | (_) | | .` | (_) || | | |\/| | (_) | |) | || _| \ V /
- # |___/ \___/ |_|\_|\___/ |_| |_| |_|\___/|___/___|_| |_|
- # _____ _ _ ___ ___ ___ _ _ _ _ ___ _____ ___ ___ _ _
- # |_ _| || |_ _/ __| | __| | | | \| |/ __|_ _|_ _/ _ \| \| |
- # | | | __ || |\__ \ | _|| |_| | .` | (__ | | | | (_) | .` |
- # |_| |_||_|___|___/ |_| \___/|_|\_|\___| |_| |___\___/|_|\_|
- #
- # Create the turtle graphics screen and set a few basic properties.
- screen = turtle.Screen()
- screen.setup( WIDTH, HEIGHT, MARGIN, MARGIN )
- screen.bgcolor( "SkyBlue" )
-
- # Create two turtles, one for drawing and one for writing.
- artist = turtle.Turtle()
- writer = turtle.Turtle()
-
- # Change the artist turtle's shape so the artist and writer are distinguishable.
- artist.shape( "turtle" )
- # Lift the artist's pen and slow it down to see the movements from object to object.
- artist.penup()
- artist.speed( "slowest" )
-
- # Make the animation as fast as possible and hide the turtles.
- if DRAW_FAST:
- screen.delay( 0 )
- artist.hideturtle()
- artist.speed( "fastest" )
- writer.hideturtle()
- writer.speed( "fastest" )
-
- # Set a few properties of the writing turtle useful since it will only be writing.
- writer.setheading( 90 ) # Straight up, which makes it look sort of like a cursor.
- writer.penup() # A turtle's pen does not have to be down to write text.
- writer.setposition( 0, HEIGHT // 2 - FONT_SIZE * 2 ) # Centered at top of the screen.
-
- return screen, artist, writer
-
-
-# The following two lines are always the last lines in a source file and they
-# start the execution of the program; everything above was just definitions.
-if __name__ == "__main__":
- main()
\ No newline at end of file
diff --git a/__ERRORS__/IndexError - list assignment index out of range/main.py b/__ERRORS__/IndexError - list assignment index out of range/main.py
deleted file mode 100644
index 9442467..0000000
--- a/__ERRORS__/IndexError - list assignment index out of range/main.py
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env python3
-
-#
-# IndexError: list assignment index out of range
-#
-
-import traceback
-
-def example1a():
- a = []
- a[0] = 1
-
-def example1b():
- a = [1,2,3]
- a[10] = 1
-
-
-#----------------------------------------------------------------------
-
-examples = [example1a, example1b]
-
-
-for function in examples:
- print('\n--- Example:', function.__name__, '---')
- try:
- function()
- #except:
- #except Exception as ex:
- except IndexError as ex:
- print('\nException:', ex)
- print('\n---\n')
- traceback.print_exc()
diff --git a/__ERRORS__/IndexError - list index out of range/main.py b/__ERRORS__/IndexError - list index out of range/main.py
deleted file mode 100644
index 2435abd..0000000
--- a/__ERRORS__/IndexError - list index out of range/main.py
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env python3
-
-#
-# IndexError: list index out of range
-#
-
-import traceback
-
-def example1a():
- a = []
- b = a[0]
-
-def example1b():
- a = [1,2,3]
- b = a[10]
-
-def example2a():
- a = []
- a[0] += 1
-
-def example2b():
- a = [1,2,3]
- a[10] += 1
-
-
-#----------------------------------------------------------------------
-
-examples = [example1a, example1b, example2a, example2b]
-
-
-for function in examples:
- print('\n--- Example:', function.__name__, '---')
- try:
- function()
- #except:
- #except Exception as ex:
- except IndexError as ex:
- print('\nException:', ex)
- print('\n---\n')
- traceback.print_exc()
diff --git a/__ERRORS__/README.md b/__ERRORS__/README.md
deleted file mode 100644
index ee4a7ad..0000000
--- a/__ERRORS__/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-
-- UnboundLocalError: local variable referenced before assignment
-
-- ZeroDivisionError: division by zero
diff --git a/__ERRORS__/UnboundLocalError - local variable referenced before assignment/main.py b/__ERRORS__/UnboundLocalError - local variable referenced before assignment/main.py
deleted file mode 100644
index 086a293..0000000
--- a/__ERRORS__/UnboundLocalError - local variable referenced before assignment/main.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/env python3
-
-#
-# UnboundLocalError: local variable 'result' referenced before assignment
-#
-# it is happend only inside function/method
-#
-
-import traceback
-
-def example1():
- print(result)
- result = 5
-
-def example2a():
- result += 5
-
-def example2b():
- result = result + 5
-
-def example3():
- '''
- - to create variable `result` you have to assign value,
- - to get value you have to calculate `1/0`
- - but it give exception "division by zero"
- - so it can't give value which you could use to create variable `result`
- - so it doesn't create variable
- - but later it tries to use it - print it
- - and it gives error "UnboundLocalError: local variable 'result' referenced before assignment"
- '''
-
- try:
- result = 1/0
- except Exception as ex:
- print(ex)
- print(result)
-
-def example4():
- if False:
- result = 5
- print(result)
-
-#----------------------------------------------------------------------
-
-examples = [example1, example2a, example2b, example3, example4]
-
-
-for function in examples:
- print('\n===== Example:', function.__name__, '=====')
- try:
- function()
- #except:
- #except Exception as ex:
- except UnboundLocalError as ex:
- print('\nException:', ex)
- print('\n---\n')
- traceback.print_exc()
diff --git a/__ERRORS__/ZeroDivisionError - division by zero/main.py b/__ERRORS__/ZeroDivisionError - division by zero/main.py
deleted file mode 100644
index 09980cc..0000000
--- a/__ERRORS__/ZeroDivisionError - division by zero/main.py
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env python3
-
-#
-# ZeroDivisionError: division by zero
-#
-
-import traceback
-
-def example1():
- 1/0
-
-def example2():
- a = 1
- b = 0
-
- a/b
-
-def example3():
- data = []
-
- print('sum:', sum(data))
- print('len:', len(data))
-
- average = sum(data)/len(data)
-
-#----------------------------------------------------------------------
-
-examples = [example1, example2, example3]
-
-
-for function in examples:
- print('\n--- Example:', function.__name__, '---')
- try:
- function()
- #except:
- #except Exception as ex:
- except ZeroDivisionError as ex:
- print('Exception:', ex)
- print()
- traceback.print_exc()
diff --git a/choose_your_own_adventure.py b/choose_your_own_adventure.py
deleted file mode 100644
index e6801fc..0000000
--- a/choose_your_own_adventure.py
+++ /dev/null
@@ -1,40 +0,0 @@
-name = input("Type your name: ")
-print("Welcome", name, "to this adventure!")
-
-answer = input(
- "You are on a dirt road, it has come to an end and you can go left or right. Which way would you like to go? ").lower()
-
-if answer == "left":
- answer = input(
- "You come to a river, you can walk around it or swim accross? Type walk to walk around and swim to swim accross: ")
-
- if answer == "swim":
- print("You swam acrross and were eaten by an alligator.")
- elif answer == "walk":
- print("You walked for many miles, ran out of water and you lost the game.")
- else:
- print('Not a valid option. You lose.')
-
-elif answer == "right":
- answer = input(
- "You come to a bridge, it looks wobbly, do you want to cross it or head back (cross/back)? ")
-
- if answer == "back":
- print("You go back and lose.")
- elif answer == "cross":
- answer = input(
- "You cross the bridge and meet a stranger. Do you talk to them (yes/no)? ")
-
- if answer == "yes":
- print("You talk to the stanger and they give you gold. You WIN!")
- elif answer == "no":
- print("You ignore the stranger and they are offended and you lose.")
- else:
- print('Not a valid option. You lose.')
- else:
- print('Not a valid option. You lose.')
-
-else:
- print('Not a valid option. You lose.')
-
-print("Thank you for trying", name)
diff --git a/number_guesser.py b/number_guesser.py
deleted file mode 100644
index 7baaa0b..0000000
--- a/number_guesser.py
+++ /dev/null
@@ -1,35 +0,0 @@
-import random
-
-top_of_range = input("Type a number: ")
-
-if top_of_range.isdigit():
- top_of_range = int(top_of_range)
-
- if top_of_range <= 0:
- print('Please type a number larger than 0 next time.')
- quit()
-else:
- print('Please type a number next time.')
- quit()
-
-random_number = random.randint(0, top_of_range)
-guesses = 0
-
-while True:
- guesses += 1
- user_guess = input("Make a guess: ")
- if user_guess.isdigit():
- user_guess = int(user_guess)
- else:
- print('Please type a number next time.')
- continue
-
- if user_guess == random_number:
- print("You got it!")
- break
- elif user_guess > random_number:
- print("You were above the number!")
- else:
- print("You were below the number!")
-
-print("You got it in", guesses, "guesses")
diff --git a/quiz_game.py b/quiz_game.py
deleted file mode 100644
index 7c0bdbb..0000000
--- a/quiz_game.py
+++ /dev/null
@@ -1,40 +0,0 @@
-print("Welcome to my computer quiz!")
-
-playing = input("Do you want to play? ")
-
-if playing.lower() != "yes":
- quit()
-
-print("Okay! Let's play :)")
-score = 0
-
-answer = input("What does CPU stand for? ")
-if answer.lower() == "central processing unit":
- print('Correct!')
- score += 1
-else:
- print("Incorrect!")
-
-answer = input("What does GPU stand for? ")
-if answer.lower() == "graphics processing unit":
- print('Correct!')
- score += 1
-else:
- print("Incorrect!")
-
-answer = input("What does RAM stand for? ")
-if answer.lower() == "random access memory":
- print('Correct!')
- score += 1
-else:
- print("Incorrect!")
-
-answer = input("What does PSU stand for? ")
-if answer.lower() == "power supply":
- print('Correct!')
- score += 1
-else:
- print("Incorrect!")
-
-print("You got " + str(score) + " questions correct!")
-print("You got " + str((score / 4) * 100) + "%.")
\ No newline at end of file
diff --git a/rock_paper_scissors.py b/rock_paper_scissors.py
deleted file mode 100644
index b05ebb7..0000000
--- a/rock_paper_scissors.py
+++ /dev/null
@@ -1,39 +0,0 @@
-import random
-
-user_wins = 0
-computer_wins = 0
-
-options = ["rock", "paper", "scissors"]
-
-while True:
- user_input = input("Type Rock/Paper/Scissors or Q to quit: ").lower()
- if user_input == "q":
- break
-
- if user_input not in options:
- continue
-
- random_number = random.randint(0, 2)
- # rock: 0, paper: 1, scissors: 2
- computer_pick = options[random_number]
- print("Computer picked", computer_pick + ".")
-
- if user_input == "rock" and computer_pick == "scissors":
- print("You won!")
- user_wins += 1
-
- elif user_input == "paper" and computer_pick == "rock":
- print("You won!")
- user_wins += 1
-
- elif user_input == "scissors" and computer_pick == "paper":
- print("You won!")
- user_wins += 1
-
- else:
- print("You lost!")
- computer_wins += 1
-
-print("You won", user_wins, "times.")
-print("The computer won", computer_wins, "times.")
-print("Goodbye!")