// Path: app/src/main/java/org/bobstuff/bobball/Direction.java
// public enum Direction implements Parcelable{
// 	LEFT,
// 	RIGHT,
//     UP,
//     DOWN;
// 
// 
//     public static Direction getRandom(Random randomGenerator) {
//         return Direction.values()[randomGenerator.nextInt(Direction.values().length)];
//     }
// 
//     //implement parcelable
// 
//     @Override
//     public void writeToParcel(Parcel dest, int flags) {
//         dest.writeInt(ordinal());
//     }
// 
// 
//     public static final Parcelable.Creator<Direction> CREATOR = new Parcelable.Creator<Direction>() {
// 
//         public Direction createFromParcel(Parcel in) {
//             return Direction.values()[in.readInt()];
//         }
// 
//         public Direction[] newArray(int size) {
//             return new Direction[size];
//         }
// 
//     };
// 
//     @Override
//     public int describeContents() {
//         return 0;
//     }
// 
// }


import java.util.ArrayList;
import java.util.List;
import android.graphics.RectF;
import android.os.Parcel;
import android.os.Parcelable;
import org.bobstuff.bobball.Direction;
/*
  Copyright (c) 2012 Richard Martin. All rights reserved.
  Licensed under the terms of the BSD License, see LICENSE.txt
*/

package org.bobstuff.bobball.GameLogic;





public class Bar implements Parcelable {
    private float speed;
    private BarSection sectionOne = null;
    private BarSection sectionTwo = null;

    public Bar(float speed) {
        this.speed = speed;
    }

    public Bar(Bar other) {
        this.speed = other.speed;
        if (other.sectionOne != null)
            this.sectionOne = new BarSection(other.sectionOne);
        if (other.sectionTwo != null)
            this.sectionTwo = new BarSection(other.sectionTwo);
    }

    public BarSection getSectionOne() {
        return sectionOne;
    }

    public BarSection getSectionTwo() {
        return sectionTwo;
    }

// Path: app/src/main/java/org/bobstuff/bobball/Direction.java
// public enum Direction implements Parcelable{
// 	LEFT,
// 	RIGHT,
//     UP,
//     DOWN;
// 
// 
//     public static Direction getRandom(Random randomGenerator) {
//         return Direction.values()[randomGenerator.nextInt(Direction.values().length)];
//     }
// 
//     //implement parcelable
// 
//     @Override
//     public void writeToParcel(Parcel dest, int flags) {
//         dest.writeInt(ordinal());
//     }
// 
// 
//     public static final Parcelable.Creator<Direction> CREATOR = new Parcelable.Creator<Direction>() {
// 
//         public Direction createFromParcel(Parcel in) {
//             return Direction.values()[in.readInt()];
//         }
// 
//         public Direction[] newArray(int size) {
//             return new Direction[size];
//         }
// 
//     };
// 
//     @Override
//     public int describeContents() {
//         return 0;
//     }
// 
// }


// Path: app/src/main/java/org/bobstuff/bobball/GameLogic/Bar.java
import java.util.ArrayList;
import java.util.List;
import android.graphics.RectF;
import android.os.Parcel;
import android.os.Parcelable;
import org.bobstuff.bobball.Direction;

/*
  Copyright (c) 2012 Richard Martin. All rights reserved.
  Licensed under the terms of the BSD License, see LICENSE.txt
*/

package org.bobstuff.bobball.GameLogic;





public class Bar implements Parcelable {
    private float speed;
    private BarSection sectionOne = null;
    private BarSection sectionTwo = null;

    public Bar(float speed) {
        this.speed = speed;
    }

    public Bar(Bar other) {
        this.speed = other.speed;
        if (other.sectionOne != null)
            this.sectionOne = new BarSection(other.sectionOne);
        if (other.sectionTwo != null)
            this.sectionTwo = new BarSection(other.sectionTwo);
    }

    public BarSection getSectionOne() {
        return sectionOne;
    }

    public BarSection getSectionTwo() {
        return sectionTwo;
    }

    public void tryStartHalfbar(final Direction barDirection, final RectF gridSquareFrame) {