Skip to content
Snippets Groups Projects

Test gitignore

Closed Nikola Babic (nab701) requested to merge test-gitignore into master
1 file
+ 20
21
Compare changes
  • Side-by-side
  • Inline
+ 20
21
@@ -23,52 +23,51 @@ public enum Modifier {
}
/**
* Outputs the combined values of two different given modifiers.
*
* @return The combined values of the given modifiers.
* Outputs the combined values of this and another modifier.
* @return The combined values of the modifiers.
* 0 if there are duplicate modifiers.
*/
public int combine(Modifier m1, Modifier m2) {
if (m1 == m2)
public int combine(Modifier m1) {
if (m1 == this)
return 0;
else
return m1.val() + m2.val();
return m1.val() + this.val();
}
/**
* Outputs the combined values of the three different given modifiers.
* @return The combined values of the given modifiers.
* Outputs the combined values of this and two other given modifiers.
* @return The combined values of the modifiers.
* 0 if there are duplicate modifiers.
*/
public int combine(Modifier m1, Modifier m2, Modifier m3) {
if (m1 == m2 || m1 == m3 || m2 == m3)
public int combine(Modifier m1, Modifier m2) {
if (this == m1 || this == m2 || m1 == m2)
return 0;
else
return m1.val() + m2.val() + m3.val();
return this.val() + m1.val() + m2.val();
}
/**
* Outputs the combined values of the four different given modifiers.
* @return The combined values of the given modifiers.
* Outputs the combined values of this and three different given modifiers.
* @return The combined values of the modifiers.
* 0 if there are duplicate modifiers.
*/
public int combine(Modifier m1, Modifier m2, Modifier m3, Modifier m4) {
if (m1 == m2 || m1 == m3 || m1 == m4 || m2 == m3 || m2 == m4 || m3 == m4)
public int combine(Modifier m1, Modifier m2, Modifier m3) {
if (this == m1 || this == m2 || this == m3 || m1 == m2 || m1 == m3 || m2 == m3)
return 0;
else
return m1.val() + m2.val() + m3.val() + m4.val();
return this.val() + m1.val() + m2.val() + m3.val();
}
/**
* Outputs the combined values of the five different given modifiers.
* Outputs the combined values of the this and four different given modifiers.
* @return The combined values of the given modifiers.
* 0 if there are duplicate modifiers.
*/
public int combine(Modifier m1, Modifier m2, Modifier m3, Modifier m4, Modifier m5) {
if (m1 == m2 || m1 == m3 || m1 == m4 || m1 == m5 || m2 == m3 || m2 == m4 ||
m2 == m5 || m3 == m4 || m4 == m5)
public int combine(Modifier m1, Modifier m2, Modifier m3, Modifier m4) {
if (this == m1 || this == m2 || this == m3 || this == m4 || m1 == m2 || m1 == m3 ||
m1 == m4 || m2 == m3 || m2 == m4 || m3 == m4)
return 0;
else
return m1.val() + m2.val() + m3.val() + m4.val() + m4.val();
return this.val() + m1.val() + m2.val() + m3.val() + m4.val();
}
}
Loading