Giter Site home page Giter Site logo

Comments (6)

yuanfengyun avatar yuanfengyun commented on August 27, 2024 1

每个版本都是OK的,但不是无脑就可以用的。你至少先读几天代码吧。

from q_algorithm.

KevinLium avatar KevinLium commented on August 27, 2024

之前一直看java,结果过了几天 大更新 都搞不懂了

from q_algorithm.

yuanfengyun avatar yuanfengyun commented on August 27, 2024

只是调整了目录,新增了一种拆分的算法。

from q_algorithm.

KevinLium avatar KevinLium commented on August 27, 2024

大神你好,这个是java新增的拆分法,里面有2个方法,看不懂 特来请教:
2个方法:test_successtest_fail
来源:qipai/mjlib_java/split/main.java
第一个test_success,里面调用 split.get_hu_info(cards, 34, 33) ,参数 33是指最后的2个白板做百搭,可以胡牌。
但是 第二个方法 test_fail 不管是否百搭 都胡不了啊,为什么还是输出了:test success
下面是这2个方法

public static void test_success() {
	int[] cards = {
		1,1,0,0,1,0,1,0,0,
		0,0,0,2,4,2,0,0,0,
		0,0,0,0,0,0,0,0,0,
		0,0,0,0,0,0,2
	};
	
	if(split.get_hu_info(cards, 34, 33)){
		System.out.println("test success"); 
	}
}

public static void test_fail() {
	int[] cards = {
		1,1,0,0,1,0,1,0,0,
		0,0,0,2,4,2,1,0,0,
		0,0,0,0,0,0,0,0,0,
		0,0,0,0,0,0,1
	};
	
	if(!split.get_hu_info(cards, 34, 33)){
		System.out.println("test success"); 
	}
}

from q_algorithm.

yuanfengyun avatar yuanfengyun commented on August 27, 2024

本身就是用来测试不能胡的,小伙子,你能不能读读函数名。这牌型本身就是胡不了,用来测试算法会不会把不能胡的牌判断成胡。

from q_algorithm.

KevinLium avatar KevinLium commented on August 27, 2024

︽⊙_⊙︽
原来是这样。。。我以为输出的test success 就是胡了呢。。。

from q_algorithm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.